Category: Interview

Find the sum of the two elements of a given array which is equal to an given integer

1. Description Asked by Google. Given a list of numbers and a number k, return whether any two numbers from the list add up to k. 2. Example Given [10, 15, 3, 7] and k of 17, return true, since 10+7 is 17. 3. Solution – 3 ways to solve it.

Read More

Google Initial Phone Screen with Recruiter

1. Questions What’s the best/worst running time of Merge Sort? O(nlogn), O(nlogn) What’s the best/worst running time of Quick Sort? O(n), O(n^2) What’s the worst running time for a look up in a HashTable? O(n) two reasons: if too many elements were hashed into the same key: looking inside this key may take O(n) time; […]

Read More