Algorithm Interview Questions

Sort: Popular Date
Sort: Popular Date

“Given a string write a function which prints all the subsets of the string. Now make the function to return only unique solutions.

For example if they give you "abc"
you print out
a
ab
abc
ac…”

“Find the Kth hisghest element in a given array.”

“First phone screen: Print all the nodes of a tree in reverse level order (ie print all the nodes at the leaves first, then print the nodes on the level above the leaves, and then eventually work your…”

“Given two sets of trees and ignoring the content of the nodes, describe rules that would define whether or not these two trees are equivalent.”

“Given a list of strings, write a function to calculate the longest common prefix (LCP) of all those strings.”

“Given a search terms, find the minimum window containing all the words”

“Print a N x M matrix in diagonal from the upper left to lower right. However, with the following caveat. It's easy to just show the input and expect output.

matrix:
a b c
d e f g
h i j k…”

“how to get the most significant bit from a byte?”

“How to retrieve a file with a specific string or keyword using UNIX command line”

“Create a data structure that minimizes time complexity of retrieving median and inserting new element. Getting median should be O(1) and insertion should be O(log(n)).”

6170 of 749 Interview Questions