LCA problem with no parent pointers. Given the root of a tree and pointers to two nodes contained in that tree, return the lowest common ancestor of the two nodes. IE, the common ancestor furthest from the root.
Software Engineering Intern Interview Questions
12,189 software engineering intern interview questions shared by candidates
4. What is the format of the floating point number? What does the following code do? Does it terminate? Float f,g; f=0; do{ g=f++; } While ((f-g)!=0);
Given an array of 1000 element, how will you find the element repeated twice in O(n) complexity
Q) How would you all values from the nodes of a given binary tree into a string and then deserialize the string and put it back in the binary tree?
Find depth of a binary tree
Reverse a linked list
Given a 5x5 board containing random characters, find all words that can be formed from consecutive adjacent (diagonals count) characters.
in an array of characters find the character that is repeated the most
Consider a simple array. What is the time complexity to insert, search, delete an element?
Given an array of integers [1,2,3,4]. and target t = 5. Come up with a solution that will print out all the unique pairs in the array that are equal t.
Viewing 141 - 150 interview questions