Tagged interview questions

I was interviewed by a recruiter from the company:

  1. How many bits needed to represent 1000000?
  2. What is the complexity of searching in a balanced binary search tree?
  3. What is the complexity of insertion in a hash table?
  4. Find two numbers in an array whose sum = X.
I must admit I was not that excited about what the company does so I was lazy answering some questions.
For instance, for question 1 I explained that we should find solution to 2 to the power of n = 1000000 but did not bother calculating the n.
Also for question 4 I gave the recruiter a better solution than the standard one (two pointers, start and end) but he did not understand it.
I have never heard from them again.

Leave a Reply

− 1 = six