Algorithm Interview Questions

Sort: Popular Date
Sort: Popular Date

“Given a set of non-overlapping integer ranges (1,3) (5,8), etc., and an input integer, what is the best way to organize the data and allow for quick search based on the input, etc.”

“How many unique paths are there from B-L point to the T-R point of a chess table? What would be your approach to calculate this?”

“Write an algorithm to verify if a tree is a binary search tree.”

“Suppose you have 100 GB of data that you want to sort, but you only have 1 GB of memory. How would you sort this data?”

“Write a function in Java that will take a sorted array of ints, possibly with duplicates, and compact the array removing all the duplicate numbers. That is, if the contains the numbers…”

“Considering a 2-dimension matrix that can only be traversed by 1 adjacent position at a time and never diagonally. Create an algorithm to traverse that matrix from its upper-left corner to its…”

“Suppose you have a matrix of numbers. How can you easily compute the sum of any rectangle (i.e. a range [row_start, row_end, col_start, col_end]) of those numbers? How would you code this?”

“How would you implement integer division if your language did not offer it.”

“You have an analog clock with two hands, one for the hour and one for the minute. Given a time of the day, what is the angle between the two hands?”

“Output a single linked list in reverse, in linear time and constant space, and recursively”

3140 of 796 Interview Questions