New grad software developer Interview Questions | Glassdoor.ca

# New grad software developer Interview Questions

71

new grad software developer interview questions shared by candidates

## Top Interview Questions

Sort: RelevancePopular Date

Oct. 13, 2010
 How to multiply a number by 7 without using + and * operators?3 Answersuse bit shifting.n=n<<3-ndo the left.bit shift operation by 3 and then subtract the result by original number . eg: n=1 ,then n=n<<3 -n gives 7 , if n=2 ,then gives 14

Apr. 11, 2014
 Using a language of your preference, write a method that returns the most common character in a string.2 AnswersAnswer in javascript function findMostChar(str) { var cal = []; str = str.toLowerCase().replace(/\s+/g, ''); function hasValue(s) { for (var i = 0; i a.count) return 1; if(b.count < a.count) return -1; return 0; }) console.log(cal[0]) } findMostChar("you can sort the keys and then retrieve the associated values");With Python: from collection import Counter Counter(s).most_common(1)[0][0] With javascript function mostCommonCharacter(s) { var counter = {} var max = 0; var mostCommon; for (var x of s) counter[x] = (counter[x] || 0) + 1; for (var chr in counter) if (counter[chr] >= max) { max = counter[chr]; mostCommon = chr; } return mostCommon; }

May 20, 2015
 Q1: Ciphering and Deciphering text like Encryption and Decryption of a string with given key value pairs. Q2: Requirements were very unclear. Q3: Create a game with 10X10 block loke battleship with 2 player functionality. 1 AnswerQ1: Created a class with 2 array key and values and a hashtable implementing it. If key is this value is this, its simple but you need to take input from user and do both ciphering and deciphering. Until you get familiar with the environment and and ways to compile, half the time is passed, so good luck. Q2: did not answer as it was optional (Do any 1 from 3) Q3: did not answer as well as it was optional (Do any 1 from 3) but i think you will have to use applets and stuff to do this. Practice all the question before you go to he interview, Good Luck !!

Jan. 31, 2019
 Write a function debounce(fn, timeout) which accepts a function and timeout as inputs and returns a function which will on allow fn to run after timeout ms.1 AnswerThe interviewer told me to use my answer from the previous question (which was wrong) to answer this one. I had some difficulty coming up with an answer and moved on once I got stuck.

Jan. 31, 2019
 Create the class SnapshottableArray, which is a normal array except it has the ability to take a snapshot in time of the current values of the array, giving a handle/id. It has the class signature below. Focus on reducing space at the cost of time complexity. Fill in the function bodies to complete the class. (I wrote the class with types to make it clear what everything does, but the code should be in JS.) class SnapshottableArray{ SnapshottableArray(int size); // create new snapshottable array with size void set(int index, int value); // set's array at index to value int get(int index); // return the array at index's value int takeSnapshot(); // take a snapshot and return the handle/id of it int getSnapshotValue(int id, int index); // return the array at index's value for the given snapshot, represented by id }1 AnswerThe idea was the save the changes, I called them deltas, between snapshots which track which the previous value of the element at the index was in the previous array. Only need to take deltas of elements that change between snapshots, which saves space. To recover a previous snapshot's value, walk back over the previous snapshots' deltas until you get to the desired snapshot. While you walk back, change the value to what it was.

Jan. 31, 2019
 Using JS Browser DOM API available functions, write "getElementsByClassName(className)" which accepts a string className and returns a list of HTML Elements which have the required className.1 AnswerI used tree traversal on the document tree and maintained a list of elements, which gets returned. The answer was simple and short, and the interviewer did not ask for any further questions about my answer.

Feb. 11, 2021

Oct. 7, 2018
 Very technical questions such as : if you have to develop a POS application what are the key elements that you need to consider?1 AnswerIf you are a computer science/ engineering new grad, then this interview should be a piece of cake. Management Information Systems Grads, I would not recomnend applying.