count the number of duplicates in a binary tree in O(n) time O(1) space.
Software Engineer 2 Interview Questions
665,666 software engineer 2 interview questions shared by candidates
Describe your everyday work methodology
What was your most challenging bug you fixed?
You have a sentence with several words with spaces remove and words having their character order shuffled. You have a dictionary. Write an algorithm to produce the sentence back with spaces and words with normal character order.
Given a binary tree, print out the whole tree by levels
1.How to find the nearest parent of any two nodes in a given tree. Tree has mother and father nodes.
What signal is sent by default in the unix kill command
Given a string A and B, find the smallest substring of A that contains all the characters from B. (implement solution in O(n), keep in mind chars in B can repeat)
Implement data structure "Map" storing pairs of integers (key, value) and define following member functions in O(1) runtime: void insert(key, value), void delete(key), int get(key), int getRandomKey().
The wiggle problem, given an array of integers arrange them such that alternate elements are large and small.(2,5,3,6,...)
Viewing 1411 - 1420 interview questions