-You are given some blocks resting on ground. So you have array like : 1, 2, 3, 4 now at each index it depicts no of blocks resting on it. Now gravity direction is changed from top to down to right to left what will be the final state of blocks in this array. So final state will be 4, 3, 2, 1.
Problem if analysed properly was actually a simple sorting problem. He asked some follow up questions on criteria on which we select any sorting algorithms (stable, in-place etc.).
-You are given an array of linked lists. Some of these lists are intersecting linked lists (having common nodes and then merging to one). So for example if there is a list of four nodes at 0th index it’s possible there is another list at some other index, say 1st index whose nodes merges to any of the nodes in 0th list. So find the number of connected groups in this structure. I used Disjoint set data structure to solve this problem.
Discussion on projects
Check if a given expression is valid or not. For example ((A+B/C)*(D-F)) is valid. And )*A+B) is not.
Discussion around Api url formats and various rest verbs
Discussion around various testing strategies (Unit, Smoke, Integration, API automations etc..).
This was a bar raiser round.
Q1: You are given size of a line line of people, say n and these n people can stand in any order and all of these n folks has distinct heights. Now from either end of the line you can see say p and q folks. Now here it’s possible some of the short height folks may be hidden behind taller folks.
For a given n, p and q find how many arrangements of all people is possible.
Q2: Preorder traversal recursive and iterative approach
Q3: Puzzle given numbers (8, 8, 3, 3) you need to form 24 using all these number once. You can use any operators(cube, cuberoot, factorial, +, -, *, /, %)
Also while using cube or cuberoot u are actually consuming one 3.
Answer was (cuberoot(8)+cuberoot(8))!
Q4: permutation of string
Q5: there are three person in a room say P1, P2, P3 all these people have some salaries say S1, S2 and S3. Now no person is willing to share his salary directly or indirectly from which individual salary can be deduced. You need to find a way to directly find the sun of salaries of all 3 folks.
Answer was to use randomisation. Each person will generate a random number and pass sum of his salary and random number to next. And so on once we have sum of all salaries and random numbers each person can subtract generated random numbers and deduce the sum of salaries from it.
Q6: Given a histogram having bars of width 1 unit and varying height, find the maximum area of a rectangle that can be formed within bar. (Rectangle formed should be contained inside bars).
- Walmart Labs Interview Experience | Java developer for 4.5 Years Experienced
- Walmart Interview Experience | 3years Experienced (SDE-3)
- Walmart Labs Interview (Experienced - 3.10 Years )
- Walmart Labs Interview Experience | Set 13 (For Experienced)
- Walmart Labs Interview Experience | Set 16 (For Experienced)
- Walmart Labs Interview Experience | Set 18 (For Experienced)
- Walmart Labs Interview Experience | Set 17 (Experienced Java Development Stack)
- Walmart Labs Interview Experience (4.10 yr experienced)
- Walmart Lab Interview Experience | Set 7 (Off-Campus 3 Years Experience)
- Walmart Lab Interview Experience | Set 8 (Off-Campus 3 Years Experience)
- Walmart Interview Experience for SDE2 | Set 19 (3.8 years experience)
- Amazon Interview Experience | Set 340 (3.5 years experienced for SDE 1)
- Microsoft Interview Experience | (SDE-2 for 3 Years Experienced)
- Amazon Interview Experience SDE 1 (2.5 Years Experienced)
- Amazon interview experience | SDE-1 | 2.5 years experienced
- Amazon Interview Experience for SDE 2 (3 years Experienced)
- Oyo Rooms Interview Experience | SDE 2 (3 years Experienced )
- Amazon Interview Experience for SDE-1(0 - 2 years Experienced)
- Myntra Interview Experience for SDE 2 (3+ years Experienced)
- Amazon Interview Experience for SDE 1 (1.5 years Experienced)
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.