Skip to content

Instantly share code, notes, and snippets.

@geraldstanje
Last active October 8, 2015 04:45
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save geraldstanje/1e03be27760582deaad9 to your computer and use it in GitHub Desktop.
Save geraldstanje/1e03be27760582deaad9 to your computer and use it in GitHub Desktop.
1. Dining philosopher
2. Given a random number generator that returns a number between [0,1], how would you build a RNG that accounted for weighting?
3. You have two arrays with N integers in them. Merge those arrays using a recursive algorithm so that the integers in the final array are sorted.
4. generators(in python) and about minesweeper.
5. given a query and a document, highlight the query in the document and return a snippet of the document itself. Don't use existing large 3rd party libraries.
6. Finding the longest palindrome in a given string.
7. query log, and how to get the top K most frequent ones
8. Maximum subarray problem
9. Generate all permutations of an alphanumeric string (lowercase/uppercase only if a letter) 10. How can you improve the service of Y?
11. Pick a random number from weighted list based on weight
12. given a string length 25, consisting of alphabet (lower and upper case) and numbers.in this string some of the upper case letters are lower cased and sent to me. I have a black box fuction that returns a integer, something like 13 or 14, that says the string I have got is correct else it throws a exception. find the right string given a corrupted string.
13. Reconstruct a binary tree given two sequences of node traversals, one from inorder and one from postorder traversal.
14. memory management (implementation of a garbage collector), compilation of Python code, what happens when a URL is typed into the browser, what can be done to speed up a select query
15. Difference between POST and GET.
16. How to prevent SQL Injection virus?
17. How to prevent Cross site visiting?
18. a fairly large log file, about 5GB. Each line of the log file contains an url which a user has visited on our site. We want to figure out what's the most popular 100 urls visited by our users.
19. min stack
20. Generic classes in C++ vs Java
21. - operating system, process, multi threads, memory models
- database, in particular, SQL language
- scripting language: python (but I think answer in perl may be okay)
- data structure & algorithm: stack, linked-list, hashmap, tree, heap, etc.
- security (attacking, encryption, etc.)
- web standards/protocol: http, dns, tcp/ip, ssl, etc.
- recursion and/or dynamic programing
- linux knowledge/commands
22. Operating system questions, explaining some concept like process, thread
23. linked list or array for binary search
24. Given a file that contains chat messages, find out the top 10 chatters in an efficient way. Assume that the usernames are unique.
For example,
<Nick1> : Howdy
<Nick2> : Some message
<Nick3> : Something else
<Nick1> : I am good
Nick1 is the top chatter, find nine others like this.
25. What command would you use to retrieve one row of data from a table using SQL?
26. What is the command for viewing memory management information in Linux?
27. Implement a Lock.
28. Write a function that returns a random line in a file.
29. Diff POST/GET ? What happens if type a URL in your browser ? How cookies are working ? HTTPS ?
30. url shortener script, data structure, basic structure, and what to do if the URL is already in the DB, what to do to get analytics ?
31. Which operation is more expensive? Multiply, Divide or Add
32. Best and worst case time for hash table lookup
33. How would you find the top 10 queries Y receives?
34. How does memory management work in <your strongest language>?
35. Given a big list of searches, how would you write a function that returns top 10 searches?
36. How would you use all the data at our disposal?
37. Describe the difference between get requests and post requests
38. What is the average disk access time?
39. in memory, what's the difference between a primitive and object
40. what's a way to set up a large database to find things quickly
41. what's the difference between hashtable and hashmap?
42. find equilibrium index
43. Generate all permutations of an alphanumeric string
44. Implement and explain a generator and what it can be used for
45. Find the longest sequence of unrepeated characters in a string.
46. Asked about the search time difference between linked list and array.
47. How to map an IP address to a server?
48. Database questions like inner join, indexing.
49. String processing question
50. Write an function to compute if a string is an anagram. Time and space complexity and how to optimize it.
51. Building regular expressions to catch specific patterns.
52. how do would you find and kill a process using a lot of CPU?
53. What is Big O notation?
54. given a huge log file and the way id find the top 10 sites in them.
55. hashtable implementation
56. Describe about process and thread.
57. How does process communicate with each other?
58. We have a fairly large log file, about 5GB. Each line of the log file contains an url which a user has visited on our site. We want to figure out what's the most popular 100 urls visited by our users.
59. What are the different synchronization mechanisms? Difference between semaphore and mutex
60. Reverse a singly linked linklist
61. Unix commands -> wordcount , finding out process information
62. Explain process after you click a URL ( on server / client side )
63. Given a Number to guess b/w 1-100 , how to point to the number in minimum time
64. Explain DNS resolution
65. Usual sorting algorithm complexity ... can it be made any quicker
66. How might you keep track of where users were coming from to get to your site?
67. If you have less memory storage, what would you use - Hash Table or Tree? Why?
68. Given an Array of integers, find an efficient way to determine if it contains 3 numbers that sum to 0
69. How to merge two arrays
70. How would you find how much system resources a process is consuming on linux.
71. Whether to use a list or linked list to implement a search tree
72. What is the average look-up time for a good hash-function
73. What situation arises when you have a parent div and all it contains is a pair of floating divs? And how can you remedy the situation.
74. Given a telephone directory which is broken in number of files, how would you find a telephone number in it.
75. u have a table wilh user information like name,age and sex. Give a smart way to sort the entires based on age.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment