Related Articles

# WhiteHat Jr Interview Experience for Software Engineer | 2 Years Experienced

• Last Updated : 30 Jul, 2021

Round 1:

LLD: Design a vehicle rental system.

Should be able to design extendible system and code should be compilable and executable and meet the requirements given

Round 2:

1. Find the median of two sorted arrays
Approach:
1. Using merge operation of merge sort generate auxiliary array and find the median
• Time complexity – O(m + n)
• Space complexity – O(m + n)
• if m + n is odd then (m + n) / 2th element
• if m + n is even then (((m + n) / 2)th + (((m + n)/2) – 1)th) / 2
• So instead of storing all values in auxiliary array when merging store the current and prev elements until current != ((m + n)/2)th element
2. Bottom view of a binary tree (https://www.geeksforgeeks.org/bottom-view-binary-tree/
Hint – store the horizontal distances of each node for each level.

Round 3:

1. Find if string is rotation of another string.

Given a string `abcde` and another string `dea`  find if `dea` is a rotation of `abcde`.

In this case, should return true.

If the strings are `abcde` and `bde` it will return false.

2. Level order traversal of a binary tree, print each level in a new line.