Pages

Saturday 10 January 2015

Twitter interview questions

  1. Maze solver
  2. Gmail architecture design
    1. http://netlojava.blogspot.com/2013/08/gmail-server-architecture.html 
    2. http://css.dzone.com/news/gmail-architecture-part-1 
  3. Given a two strings, return whether the second is an anagram of a palindrome of the first string.
  4. Online Machine Learning
  5. Graph Algorithm
  6. Bit manipulation
  7. Get unfair coins using fair coins https://dicedcoins.wordpress.com/2012/07/30/simulate-fair-coins-unfair/ 
  8. Determine if a BST is valid or not
  9. 1) Find the single number in a array, all other elements are paired. 2) Give a array A[k], define the set S{k} := { A[k], A[A[k]], A[A[A[k]]], ... }, write program to count the maximum size of Sks.
  10. integer N and returns an NxN matrix with incrementing integers in a spiral, from outside in.  
  11. Overlap intervals
  12. Top k terms in unsorted array
  13. In order iterative bst traversal
  14. Questions given a vector of strings of length n with each word having a length of m on average, group all anagrams into a cluster. Do this for the case that n >>>>>> m and in the most efficient way possible. Assume extra space allowed.
  15. Given a number, tell how many 1s are there in the binary format of this number
  16. http://stackoverflow.com/questions/2344496/how-can-i-print-out-all-possible-letter-combinations-a-given-phone-number-can-re 
  17.   http://www.lifeincode.net/programming/leetcode-letter-combinations-of-a-phone-number-java/
  18. Tree to ordered double linked list
  19. Implement hash table
  20. Given n sets of choices: (1,2,3), (2,3,4), (4,5)

    You pick one element from each set of choices.

    Generate all possible picking.
  21. Trie
  22. Subset sum
  23. Topological sorting
  24. Implement divide operation using multiply
  25.  http://javahungry.blogspot.com/2014/05/convert-math-number-to-equivalent-readable-word-in-java-code-with-example.html
  26.  http://leetcode.com/2010/09/print-all-combinations-of-number-as-sum.html
  27. http://rleetcode.blogspot.com/2014/02/combination-sum.html 
  28. 4SUm
  29. Given two nodes in a binary tree find the number of nodes, between the path to the two nodes
  30.  LRU cache
  31. Given sorted dictionary, sort the characters
  32. Given a list of names. Find whether a particular name occurs inside a given tweet or not. If found return true otherwise false Time complexity should be less than O(n).  - suffix tree
  33. Given the pre-order sequence of a binary tree, how many trees can be created from this
  34. Validate if a tree is BST
  35. 4 points form a square
  36. http://www.careercup.com/question?id=14951746
  37. Design a hashmap
  38. Design a thread safe hashtable
  39. Design a collaborative editor - where each participant can go offline
  40. Given a string representing roman numeral, find and return its numeric value. e.g. XXIV = 24 and so on. 
  41. Top K queries from search logs
  42.  
    •  
    • Output : (*, *, *), (*, *, c), (*, b, *), (*, b, c), (a, *, *), (a, *, c), (a, b, *), (a, b, c)   Answer Question
    • Convert infix expression into postfix.   Answer Question
    • Write code that walks thru all src code starting from a root dir. and create histogram of number of characters per line across all files.
     

No comments:

Post a Comment