Jump to content

Tech interview questions helpful for dbians


anna_gari_maata

Recommended Posts

2 minutes ago, anna_gari_maata said:

As per Db friends request here are the compilation of tech interview questions I faced. Hope this will help @bankris @csrcsr

Prep is simple.. do blind 75

 

Google 1 (2019)

Phone :

Wiggle Sort

Given a binary string with 0s 1s and ?s replace all '?' with all possible combinations of 0s and 1s

Onsite :

1.      Binary tree game - Two players can choose any unselected nodes and all the child nodes will go to them. write code to win the game

2.      IP Address validator

3.      Given a map with each country has alliances, find if two countries are allied

4.      Design a get method in a class O(1) (don't remember full q)

5.      Get frequency count of word char using matrix, what if there are million letters

 

Google 2

Phone: Design hit counter

Onsite

1.      Replace strings in Unix file that are between %% from key value store, edge case is key can be value

2.      Design a Multithreading API using executor service to get sum of word count from multiple servers

3.      Given binary tree find the path from x node to y node

4.      Given a route on a map with multiple destinations and each route with different speed. Find the fastest way to reach destination (DP)

 

Amazon 1 (2019)

Online Assessment : 1. Nearest destinations from origin

2. BFS shortest path in matrix

Onsite

1.      LRU Cache design

2.      Binary Tree locking

3.      Detect Cycle in graph

4.      API Design - design a map with real time warehouse delivery service

 

Amazon (2021)Online Assessment :
1. Movies on flight

2. Best time to buy and sell stock

Onsite

1.      ZigZag traversal

2.      Matrix populate 1s and 0s

3. System design - tinyurl

4. Behavioral

 

Facebook

Phone:

Resort array using heap 

Binary Search tree equality

 

1.      Farthest point from a point in matrix with obstacles

2.      Vertical order traversal

3.      IsPalindrome

4.      Design event management system

 

Goldman Sachs

1. Pascal’s Triangle

 

Microsoft 1

BST next greatest node

1.      LRU Cache

2.      Swim in rising water

3.      Islands

4.      Traffic app design with minimal pings to third party service

 

Microsoft 2

Number of islands -  Extra time - get the island with max height

1.      Design Rate limiter

2.      All permutations of a word

3.      Inorder traversal without recursion

4.      Given an array with construction, school zone, limits etc. find current speed limit

 

 

Ebay

K distant from node in binary tree

 

Cruise

Design Sparse matrix

Thanks for sharing bro

Link to comment
Share on other sites

37 minutes ago, Vaampire said:

Solved most of them and remember solutions 😀😀😀

increased number of questions in LC adding more complexity .

was able to solve hard eulerian path (reconstruct itinerary) in one  but failed to solve medium decode string a2[b2[c]] -> abccbcc in another brahmi6.gif . i remember it uses stack but was storing indexes and interviewer had to help. 

  • Sad 1
Link to comment
Share on other sites

9 minutes ago, karthikn said:

increased number of questions in LC adding more complexity .

was able to solve hard eulerian path (reconstruct itinerary) in one  but failed to solve medium decode string a2[b2[c]] -> abccbcc in another brahmi6.gif . i remember it uses stack but was storing indexes and interviewer had to help. 

congratulations...so you finally cleared it

Link to comment
Share on other sites

1 hour ago, anna_gari_maata said:

As per Db friends request here are the compilation of tech interview questions I faced. Hope this will help @bankris @csrcsr

Prep is simple.. do blind 75

 

Google 1 (2019)

Phone :

Wiggle Sort

Given a binary string with 0s 1s and ?s replace all '?' with all possible combinations of 0s and 1s

Onsite :

1.      Binary tree game - Two players can choose any unselected nodes and all the child nodes will go to them. write code to win the game

2.      IP Address validator

3.      Given a map with each country has alliances, find if two countries are allied

4.      Design a get method in a class O(1) (don't remember full q)

5.      Get frequency count of word char using matrix, what if there are million letters

 

Google 2

Phone: Design hit counter

Onsite

1.      Replace strings in Unix file that are between %% from key value store, edge case is key can be value

2.      Design a Multithreading API using executor service to get sum of word count from multiple servers

3.      Given binary tree find the path from x node to y node

4.      Given a route on a map with multiple destinations and each route with different speed. Find the fastest way to reach destination (DP)

 

Amazon 1 (2019)

Online Assessment : 1. Nearest destinations from origin

2. BFS shortest path in matrix

Onsite

1.      LRU Cache design

2.      Binary Tree locking

3.      Detect Cycle in graph

4.      API Design - design a map with real time warehouse delivery service

 

Amazon (2021)Online Assessment :
1. Movies on flight

2. Best time to buy and sell stock

Onsite

1.      ZigZag traversal

2.      Matrix populate 1s and 0s

3. System design - tinyurl

4. Behavioral

 

Facebook

Phone:

Resort array using heap 

Binary Search tree equality

 

1.      Farthest point from a point in matrix with obstacles

2.      Vertical order traversal

3.      IsPalindrome

4.      Design event management system

 

Goldman Sachs

1. Pascal’s Triangle

 

Microsoft 1

BST next greatest node

1.      LRU Cache

2.      Swim in rising water

3.      Islands

4.      Traffic app design with minimal pings to third party service

 

Microsoft 2

Number of islands -  Extra time - get the island with max height

1.      Design Rate limiter

2.      All permutations of a word

3.      Inorder traversal without recursion

4.      Given an array with construction, school zone, limits etc. find current speed limit

 

 

Ebay

K distant from node in binary tree

 

Cruise

Design Sparse matrix

Veetiki Froxy ekkaka dhorukutharu bhaiya?

Link to comment
Share on other sites

1 hour ago, Vaampire said:

Solved most of them and remember solutions 😀😀😀


Sometimes I don’t even understand the LC  code logic , can’t solve the easy problems..

Even if I understand the logic , not able to write by myself without seeing the logic again.

since my day to day does not involve in coding .. but I want to change to development.. what is the best approach I can follow to get better.

Any one in similar situation, how did you improved

Link to comment
Share on other sites

56 minutes ago, karthikn said:

increased number of questions in LC adding more complexity .

was able to solve hard eulerian path (reconstruct itinerary) in one  but failed to solve medium decode string a2[b2[c]] -> abccbcc in another brahmi6.gif . i remember it uses stack but was storing indexes and interviewer had to help. 

Bad luck bro. It happens.. just keep trying

Link to comment
Share on other sites

3 minutes ago, Hindhustani said:


Sometimes I don’t even understand the LC  code logic , can’t solve the easy problems..

Even if I understand the logic , not able to write by myself without seeing the logic again.

since my day to day does not involve in coding .. but I want to change to development.. what is the best approach I can follow to get better.

Any one in similar situation, how did you improved

Question to developers do the coding every day .. what is your comfort level solving LC problems.. how did you all get improved.. help me man :) share your secret sauce.. even college graduates out of college doing hard problems , but with experience not able to solve.. I feel the guys born from some other world who does LC hard , man I feel them gods in coding.. not sure how you all feel 

  • Haha 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...