least common ancestor
Software Interview Questions
748,807 software interview questions shared by candidates
Given two large files of integers, only one byte difference. Find out this byte if memory is limited. What if memory is unlimited? Tell the complexity of your algorithm and analyze it.
difference between "hashing a string" and "encrypting a string". Then: is it possible to find two elements for which the hash is the same?
You have a file of 1 million numbers, how do you find the top 1000?
design api for cache management
Give pseudocode over phone and code on a shared screen how to scramble an array of integers in random order. Then optimize it for better performance.
You got some baby bottle samples. You would like to know the max height you can drop it without breaking the bottle. Let set the unit as 1 foot. And the highest height you can reach is at N feet. So how would you find the (max) safe height?
Find the maximum value in a stack, with constant complexity
Given a list of numbers and a rand(0,1) function, which returns a random integer between 0 and 1. Provide an algorithm to randomly sort the given list, based on the output of the rand() function, which should be called once for every number on the list. Code the solution in any language of your choice.
He asked the best way to store boolean values on memory. I said an array but he wanted more, so in the end I said BinaryVector class. He asked why a binary vector is a better option but I couldn't answer that. I told him that I don't know the internal implementation.
Viewing 2091 - 2100 interview questions