Monday, December 2, 2013

Technical Problem 4


Given a number N, write a program that returns all possible combinations of numbers that add up to N, as lists. (Exclude the N+0=N)

For example, if N=4 return {{1,1,1,1},{1,1,2},{2,2},{1,3}}

Technical Interview Problem 3

 Design a component that will implement web browser history. the user goes to different site and once he press on history button you should display the last 5 (no duplicates allowed, and 5 can be any N later) if duplicates occur display the most recent one. so if user visit : G,A,B,C,A,Y and than press "history" we will display Y,A,C,B,G. and of course he can go later to two other websites and than press "history" we will show them than the previous 3. 

Technical Interview Problem 2

You visited a list of places recently, but you do not remember the 
order in which you visited them. You have with you the airplane 
tickets that you used for travelling. Each ticket contains just the 
start location and the end location. Can you reconstruct your journey?

Technical Interview Problem 1


given a dictionary of wrods,find the pair of word with following property:
1,the two word don't have same letter.
2,the multiple of the two word's length is maximum.
i give a simple O(n*n*k)(k is the average length of word) method.but i think there will be better one .

Write a method to convert base of given number