How to multiply a number by 7 without using + and * operators?
Software Engineer Interview Questions
467,443 software engineer interview questions shared by candidates
Deep copy of a linked list, with an extra pointer to a random node.
Count the 1s in the number
Add two binary numbers represents in strings, those could be large values.
During the second interview, I was asked to implement LCA in a binary tree (not BST) on collabedit.com. I was close, but not close enough...
Questions asked included (only) printing the nodes of a linked list in reverse, finding the longest palindrome in a given string, finding maximum subarray sum (similar to Kadane's Algorithm) with the constraint that two numbers in the array that form the max sum cannot be next to each other.
Find lowest common ancestor (LCA).
A professor wants to see if two students have cheated when writing a paper. Design a function : hasCheated(String s1,String s2, int N) that evaluates to true if two strings have a common substring of length N. Additional question after implementation. Assume you don't have the possibility of using String.contains() and String.substring(). How would you implement this. Questions about complexity of my solution. Overall a very friendly interviewer, was saying "Good" the entire time, but no idea if he wanted to keep me focused or if it was really good.
Give a set of objects and a function. Pass two objects to that function and it can tell you whether one object points to another one. Find one object that is pointed by all other objects.
Fibonacci: recursive and iterative.
Viewing 2441 - 2450 interview questions