Algorithm Interview Questions
“(a) first, write a function to calculate the hamming distance between two binary numbers |
“Convert a binary search tree to a sorted, circular, doubly-linked list, in place (using the tree nodes as the new list nodes).” |
“Describe a routine which returns the set of integers in {1..100} divisible without remainder by 3 but not by 9.” |
“Find the second largest element in a Binary Search Tree” |
“Given a list of integers, some of which may be negative, extract the pair that sums to the largest number.” |
“Implement the "see and tell" algorithm with a given seed number x and a number of iterations y. Output the result on iteration y” |
“There are n pots with different # gold coins in them. Two players play a game, where each player can select a pot at either ends. maximize the gold” |
“If you have a file containing millions of integers, how would you sort the data in the file using extremely limited resources, such a s 1GB of memory?” |
“How would you find the pairs of numbers that added to some specific number in an array.” |
1 of 1 found helpful |
“Write a function that computes the intersection of two arrays. The arrays are sorted. Then, what if one array is really larger than the other array?” |