Walmart Labs Interview Experience | Java developer for 4.5 Years Experienced
1. Given a string containing only R and L. Find the number of balanced substrings(equal number of L’s and R’s) you will encounter where you can traverse only in the left-right direction.
Example 1: RLRRLLRLRL Answer: 4 (RL, RRLL, RL, RL)
Example 2: LLLLRRRR Answer:1 (LLLLRRRR)
Example 3: RLLLLRRRLR Answer:3 (RL, LLLRRR, LR)
2. Given a tree and a node, find a list of neighbors who are not siblings of given node.
1. Given a String like 1,1,2,2,3,4,2,2,2,2,2,2,7,8,9,10 print range of a number which is repeated most number of times continiuously.
Example: 1,1,2,2,3,4,2,2,2,2,2,2,7,8,9,1 Answer: 6,11 (2 repeated most number of times from index 6 to 11)
2. Explain all Java OOPS concepts with examples
3.Given Employee and department tables. Department table has non-unique department names. Write a query to print department name and sum of salaries in that department only without including id columns. If 2 department names are same with different ids, then they should be different in the result.
4. Some questions on git stratagies.
Round 3: HR discussion