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 }
New Grad Software Engineer Interview Questions
2,866 new grad software engineer interview questions shared by candidates
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.
Dont remember questions in snapshot, used hash-map, stacks and recursion. Phone Interview: An m*n matrix filled with 0's and 1's, Find maximum number of squares that have all 1's in int.
leetcode medium/hard
system design: Build a system that takes data from a Stock Exchange and displays it on Bloomberg Terminal. Code Questions will not be from Leet Code, they will be complex in nature and will require you to think about the DS.
During phone interview I was asked two questions: 1) Permutations of the string 2) Leetcode word break II
Cannot disclose the questions that were asked
Pick one thing/technology and explain it.
algorithm questions and why choose Blend
dp question related to LCS
Viewing 131 - 140 interview questions