-
Nth last
How would you find the nth to last element in a linked list?
-
Card Shuffle
Explain algorithm to shuffle cards
-
Jigsaw puzzle
Coding: Jig saw puzzle. What are the data structures? Assume you have some method which can tell you if two pieces fit together. How would you solve the puzzle, minimizing the number of times you have to call that function?
-
Parsing phone numbers
You have 50,000 html files, some of which contain phone numbers. How would you create a list of all the files which contain phone numbers?
-
Repeated element
How would you detect a repeated element in an integer array.
-
Smoothening the curve
Write a function to smooth out stock fluctuations.
-
Union
Given two sets, Write a function to provide the union of them.
-
Most viewed
Design an algorithm to calculate the most user viewed pages
-
Duplicates
Design an algorithm to find duplicates in an array.
-
BST Serialization
Design an algorithm and write code to serialize a binary tree.
-
Numbers with Sum
Design an algorithm and write code to find two numbers in an array whose sum equals a given value
-
Bits in Integer
count bits in an integer.
-
Similar Trees
Given two binary trees, find whether or not they are similar.
-
Random character from stream
assume your computer is reading characters one by one from a stream (you don't know the length of the stream before ending). Note that you have only one character of storage space (so you cann't save the characters you've read to a something like a strong). When you've finished reading you should return a character out of the stream with equal probability.
-
Print Tree
You have a tree (not Binary) and you want to print the values of all the nodes in this tree level by level.