You are given a mn grid. You are asked to generate k mines on this grid randomly. Each cell should have equal probability of k / mn of being chosen. Your algorithm should run in O(m) time.
Given two binary search trees how do we merge everything so it prints inorder. The answer I gave was to run inorder on both trees and use "merge" from merge-sort.
You have an API to check if is it possible to move left, right, up, down and one more method to check if current position is the last one. Find the shortest way to the last position. You don't have any data structure - only API.
Calculate tax if Salary and Tax Brackets are given as list in the form
[ [10000, 0.3],[20000, 0.2], [30000, 0.1], [null, .1]]
null being rest of the salary
Is there a way to reach (0,0) from a mXn matrix to (m-1,n-1) position and give the path.
n-ary Tree with each node having a boolean flag. Traverse all the nodes with only boolean flag = True. Return the total distance traveled from root to all those nodes.
Some question related to caching and balancing. Not exactly the "design twitter" type of question, but expect to talk about different components, latency, throughput, consistency and availability.
A remote server is not responding. Debug the issue. Needed to cover entire TCP/IP stack(fragmentation/icmp/etc) + machine metrics (vmstat,iostat,strace etc). Describe virtual memory in terms of demand paging.
2 machines are connected, suddenly 1 machine is responding slowly. Why ?
We had a good discussion in which we discussed everything under the sun, from NFS being bad to Networking being wrong to Kernel running out of resources(buffer-cache/inodes/virtual memory). Interviewer was interested to know the commands that i would use (strace, lsof, readlink, cat /proc/pid etc).
Copy some resource from N sources to M sinks. where N could be < 10 and M could be 10k/Millions etc.
Design File Storage System. Like Dropbox, Google Drive
Not any fancy one like design Twitter or Uber. More on scheduling service side and i designed using SQL appraoch. Discussed concuurency issues, Table schemas, composite keys etc.
Design recommendation of celebrities to user on Instagram
Design search for Twitter
Design a Content publishing site with privacy restrictions.
System Design of Uber. He liked my design. He was really nice guy, i felt he was interested in my success.
Design a type ahead features for a website. We discussed various data structures, advantage /disadvantages. Lot of different cases, scenario to handle etc.
Design instagram client side.
Design a leetcode contest, leadership board system
Design Instagram
Design keyword search in FB Posts
There are music providers like spotify, apple music etc. Design a service for these providers to display top 10 songs played by each user. Was aked to write ER tables and API's.
Design a system like Hacker Rank for a programming contest and their ranking.
5. Behavioral:
Work experience, past projects, standard "tell me about a time" questions, hypothetical scenario questions
Usual stuff around things that I am proud of/ projects that I regret etc
Tell me about your current role
Tell me about a projects you are proud of
Tell Me About A Time When You Had To Give Someone Difficult Feedback. How Did You Handle It?(What kind of feedback you give ?)
Tell me about a time when you had a conflict with a manage and how you resolved it
What's the most difficult/challenging problem you have had to solve?
Which environment is best to you to work ?
Tell about best decision in your life from childhood ? Decision that changed your life
On which topics you want improve? What are doing to impoving on that topics ? Did you try build project on that topics ?