I reached out to the Hiring Manager via LinkedIn. The very next day HR reached out to me with the interview details. I had a brief conversation with her about my profile and experience, with the role. I asked for some time to prepare for the rounds, so the rounds were scheduled after two weeks. In the meantime, they scheduled a meeting with the hiring manager to discuss the job insights and the role. He gave a brief introduction and answered all my questions as it was a 1:1 session. Next, the interview rounds.
Round 1 (Coding Round) :
First Question:
You are given two integer arrays nums1 and nums2, sorted in non-decreasing order, and two integers m and n, representing the number of elements in nums1 and nums2 respectively. Merge nums1 and nums2 into a single array sorted in non-decreasing order. The final sorted array should not be returned by the function, but instead be stored inside the array nums1. To accommodate this, nums1 has a length of m + n, where the first m elements denote the elements that should be merged, and the last n elements are set to 0 and should be ignored. nums2 has a length of n. Example 1: Input: nums1 = [1,2,3,0,0,0], m = 3, nums2 = [2,5,6], n = 3 Output: [1,2,2,3,5,6] Explanation: The arrays we are merging are [1,2,3] and [2,5,6]. The result of the merge is [1,2,2,3,5,6] with the underlined elements coming from nums1.
Example 2: Input: nums1 = [1], m = 1, nums2 = [], n = 0 Output: [1] Explanation: The arrays we are merging are [1] and []. The result of the merge is [1]. Note that because m = 0, there are no elements in nums1. The 0 is only there to ensure the merge result can fit in nums1. This was the first question. Second Question:
Given an array of integers arr, return true if the number of occurrences of each value in the array is unique, or false otherwise. Example 1: Input: arr = [1,2,2,1,1,3] Output: true Explanation: The value 1 has 3 occurrences, 2 has 2, and 3 has 1. No two values have the same number of occurrences. Example 2: Input: arr = [1,2] Output: false Example 3: Input: arr = [-3,0,1,-3,1,1,1,-3,10,0] Output: true
Constraints: 1 <= arr.length <= 1000 -1000 <= arr[i] <= 1000 Round 2 (Hiring Manager round):
Started with a self-introduction and then he asked questions on projects, some questions on testing, java, and as well as SQL.
Next, he jumped to the coding question :
Calculating the number of ways you can reach a value with coins is a classic computer science problem. Specifically, given a list of integers coins and an integer target, how many combinations of coin members are there that sum to the target if you can use each member of coins unlimited times? For example: coins = [2, 5, 6] target = 10