Two Sigma Interview Report
- 0of 0 votes
AnswersYou are given following design architecture.
[DB] <==> [Server]
Now let's say user are complaining about our server being slow, how would you figure out where is the problem?
- sonesh May 08, 2017 in United States
2) now let's say the problem is in server, where do you think the problem is in server?
3) What if you found our server is fast, how about now?
4) you have also found that the network call from server to DB is also fast, how about now?
5) Lets say, our server is also setting near the complaining user, how about now?| Report Duplicate | Flag | PURGE
Two Sigma Software Engineer / Developer design - 0of 0 votes
AnswersYou are given two Queues where each queue contains timestamp price pair. You have to print <price1 price 2> pair for all those timestamps where abs(ts1-ts2) <= 1 second where ts1 and price1 are the from the first queue and ts2 and price2 are from the second queue.
- sonesh May 08, 2017 in United States
Now let's say one queue is slow, what kind of modification you will make?| Report Duplicate | Flag | PURGE
Two Sigma Software Engineer / Developer Stacks q - 0of 0 votes
AnswersYou are given an array of nodes where each node consists of node name, isValid flag, and parent Node index. so, this array actually represents a tree(forest). where root node has -1 as its index for the parent node. rest all node have their parent's index value.
- sonesh May 08, 2017 in United States
You will be given this array and an index. You have to cut down the subtree from the index. Cutting down a tree means, making all the nodes of that subtree false(Isvalid flag).
He was expecting O(N) solution.| Report Duplicate | Flag | PURGE
Two Sigma Software Engineer / Developer Arrays Coding Trees and Graphs - 0of 0 votes
AnswersDefine Reverse Polish notation calculator. Interviewer needed class design for the calculator. Please make sure that adding extra operator tomorrow should not make us change the class or any of its methods.
- sonesh May 08, 2017 in United States| Report Duplicate | Flag | PURGE
Two Sigma Software Engineer / Developer design - 0of 0 votes
AnswersRegex matching algorithms
- sonesh May 08, 2017 in United States
You will be given a string and a pattern string consisting of only '*','?', and small letters. You have to return tree or false based upon the comparisons.
? repersent one char.
* means zero or n number of char for any positive n.
Example
abc, a?c : true
abc, a*?c : true
abc, * : true
abc, ?c : false| Report Duplicate | Flag | PURGE
Two Sigma Software Engineer / Developer String Manipulation