One bridge, 4 people. A, B, C, D. A takes 2 mins to cross the bridge, B 4 mins, C 8 mins, D 16mins. It is dark and 1 torch. So, 2 people need to cross the bridge at the same time, so that one person can bring back the torch for the next group to cross the bridge. The 2 pepole group walks at the pace of the slower walker. How to cross the bridge in the fasted way?
Senior Developer Interview Questions
94,508 senior developer interview questions shared by candidates
# a list of strings. Each string is a management / report relationship. # # EXAMPLE INPUT: # # [ # 'B,E,F', # 'A,B,C,D', # 'D,G,I', # 'G,H' # ] So, write some code (pseudo or language of your choice, including SQL) for the following: A is the manager of B, C, D. B is the manager of E and F, and so forth. # EXAMPLE OUTPUT: # # A # ....B # ........E # ........F # ....C # ....D # ........G # ............H # ........I
Implement atoi and itoa
Print numbers 1 to 100 in sequence using multiple threads.
What is the efficiency of finding an element in an unsorted array of strings
Find the largest sum of contiguous numbers in an array
Design an alert system. You have 500,000 hotels you represent, and about 250,000 are visited each day. You want to track hotel page visits such that, if more than 10 visitors per a) 5 minutes, b) 1 hour, and c) 24 hours occur, then a (different for each time period) "alert" appears when someone visits one of those "hot" hotel pages. Don't worry about the UI part, just design the underlying alert system. Then optimize your solution for space.
Hardest things to unit test
Given a tree of child/parent relationships, write an algorithm to find common parent
Write Java code to check if a string is a palindrome.
Viewing 81 - 90 interview questions