All the rounds were conducted in Google Meet
Round 1:
Find the Order of Alphabets in Alien Language. (based on Alien Dictionary Problem)
Example 1:
Input: words = {"baa", "abcd", "abca", "cab"}
Output : {'b', 'd', 'a', 'c'}
Example 2:
Input: words = {"caa", "aaa", "aab"}
Output : {'c', 'a', 'b'}
Round 2:
Round 3:
Round 4:
Minimum Swaps to convert string S1 to S2. (Only adjacent characters can be swapped)
Example 1:
Input: s1 = "abcd", s2 = "cdab"
Output: 4
Example 2:
Input: s1 = "abcfdegji", s2 = "fjiacbdge"
Output: 17
Round 5:
Find Optima Index(s) in a given Array.
Example:
Input: nums = {5, 6, 7, 8, 7, 6, 5, 4, 3, 4, 5, 6, 7, 6, 5}
Output: {3, 8, 12}
Explanation:
Optima indices are those where the value is either greater than (or) less than both its
neighbours. At index 3 the value 8 and at index 12 the value 7 are both
greater than their neighbours and at index 8 the value 3 is less than
both its neighbours.
Constraints:
1. Elements in the array are consecutive and they maybe in increasing or decreasing order.
2. Number of Optima indices (k) <<<<<<< n (Array size)
3. Array extremes are not optima indices
4. Should solve this problem in less than O(n) (Recursive approach)
This round was with one of the founders of the firm. After solving the above problem, he spoke about the company and the product and what they are trying to achieve in the near future. After this round, the HR manager called me and told that they are extending me an offer.