The interview consisted of 8 questions in 70 minutes.
There were 2 coding questions, 1 database question, and 5 multiple choice questions
First coding question:
Given an array arr of n integers, a squence of n-1 operations must be performed on the array.
in each operation,
- remove the minimum and maximum elements from the current array and add their sum back to the array
- the cost of an operation, cost = ceil(minimum_element + maximum_element)/(maximum_element - minimum_element +1)
find the total cost to reduce the array to a single element
Second coding question:
Given a binary string consisting of characters '0's and '1', the following operation can be performed on it:
- chose two adjacent characters, and replace both the characters with their bitwise XOR value. For example, if binaryStr = "1100" and the fist two characters are chosen, then after one operation, the string becomes binaryStr = "0000.
the goal is to find the minimum number of operations needed to convert all characters of the string to '0'.
example:
consider the given binary string to be binaryStr = "101".
an optimal sequence of operations is:
- Select the 1st and 2nd character, then binaryStr = "111"
- Select the 1st and 2nd character, then binaryStr = "001"
- Select the 2nd and 3rd character, then binaryStr = "011"
- Select the 2nd and 3rd character, then binaryStr = "000"
Those were the coding questions.
The database question gave a database with IDs, Names, Countries, and Credit and asked to display the IDs and names of everyone from the USA that has a Credit limit of more than 100000 sorted by IDs


