-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 Labs Interview (Experienced - 3.10 Years )
- Walmart Interview Experience | 3years Experienced (SDE-3)
- Walmart Labs Interview Experience | Set 18 (For Experienced)
- Walmart Labs Interview Experience (4.10 yr experienced)
- Walmart Labs Interview Experience | Set 16 (For Experienced)
- Walmart Labs Interview Experience | Set 13 (For Experienced)
- Walmart Labs Interview Experience | Set 17 (Experienced Java Development Stack)
- Walmart Lab Interview Experience | Set 8 (Off-Campus 3 Years Experience)
- Walmart Lab Interview Experience | Set 7 (Off-Campus 3 Years Experience)
- Walmart Interview Experience for SDE2 | Set 19 (3.8 years experience)
- OYO Interview Experience | Set 11 (For 2 years experienced)
- Oyo Interview Experience | 3.5 years Experienced for SDE-2
- Oyo Interview Experience | 3 years Experienced for SDE-2
- McAfee Interview Experience | SDE-2 (4.5 years experienced)
- Adobe Interview Experience | Set 37 (3.5 Years Experienced)
- Adobe Interview Experience (3+ years experienced)
- Amazon Interview Experience(2 years Experienced)
- Zomato Interview Experience (4+ years Experienced )
- Cadence Interview Experience | Set 3 (For 6 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 firstname.lastname@example.org. 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.