Skip to content

Instantly share code, notes, and snippets.

@kashyapp
Created October 20, 2011 18:52
Show Gist options
  • Save kashyapp/1301959 to your computer and use it in GitHub Desktop.
Save kashyapp/1301959 to your computer and use it in GitHub Desktop.
questions
Questions
• remove spaces
• second highest
• binary search
• reverse byteorder
• search for pattern in a binary tree
• sum in a sorted list
• binary tree serialize, deserialize
• atoi, atof
• gcd calculation :)
• rotate by n
• separate odd even nodes in list
• rareorder
∘ f e d a b c g
• products in an array
• three way partitioning
• all words in dictionary that contain a pattern
∘ anagrams
• permutations
• find missing number given n-1 numbers between 1 and n,
∘ find the one duplicate
• merge two sorted arrays
• spiral traversal of tree
• iterative tree traversal,
∘ postorder > inorder > preorder
• dfs, topological sort, graph partitioning
• fizz buzz, %3 and %5
• least common ancestor
• find the highest bit that is set in an int
• string intersection
• search in a circularly shifted sorted array
• kth largest, k closest points
• replace by right closest greater in array
• Largest Span: Given an array of integers, find two indices 'k' and 'j' such that A[k] <= A[j] and j-k (such that j >= k) is maximum.
• sums in a triangle: in a triangle of numbers, start from the top and find path to bottom with max sum
• next unsigned int with same number of 1s
• path to deepest node
• sort by priorities
• linked list versus vector
• two linked list intersect?
• resizable vector
• loop in linked list
∘ find the loop point
• add reversed numbers
• powerseti
• crawler
• ivrs
• calendar, find all conflicts
• number of paths in a grid
• mintoll
∘ 0 3 5 4 3 | 2 1 4 4 2 | 5 2 9 2 7 | 3 1 1 3 0
• gattaca
• codejam alien language
• genparen
• construct tree from ancestry
• search engine segments, switches, greedy, minimize switchesui
• two robots, work fast
• combining elements
• square tiles
• number of instances of k in a sorted array
• how to do spell check
7 2 3 8 9 10 5 8
8 3 8 9 10 -1 8 -1
H B C D A G F
http://maxnoy.com/interviews.html
http://www.nomachetejuggling.com/2010/04/06/avoiding-the-big-design-interview-question/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment