Round 1
Questions:
Question 1
A software development team is building a data encryption tool for secure communication. Given a dataset, data, of size n, the tool calculates the XOR (exclusive or) of multiple elements from the dataset to generate unique ciphertexts as part of the encryption process. The task is to calculate the number of distinct ciphertexts or distinct values that can be obtained by XORing three elements from the given dataset data, considering different combinations of the indices.
Note: If the elements with indices i, j, and k (0 ≤ i, j, k < n) are selected, some of these indices (i, j, or k) may be the same.
Verdict- All test cases passed
Candidate's Approach
No approach provided.
Interviewer's Feedback
No feedback provided.
Question 2
An investor has saved some money and wants to invest in the stock market. There are a number of stocks to choose from, and they want to buy at most 1 share in any company. The total invested cannot exceed the funds available. A friend who is a stock market expert has predicted the values of each stock after 1 year. Determine the maximum profit that can be earned at the end of the year assuming the predictions come true.
Verdict- All test cases passed
Candidate's Approach
No approach provided.
Interviewer's Feedback
No feedback provided.
Question 3
A forklift operator navigates products within an automotive parts warehouse. The dashboard displays a real-time map showing open and blocked sections as an n x m matrix of 1's (open) and 0's (blocked). The operator starts at the top-left corner of the map at warehouse[0][0] and aims to reach the bottom-right corner at warehouse[n-1][m-1]. Movements can only be made to the right or downward. Given the warehouse map, calculate the number of distinct paths from warehouse[0][0] to warehouse[n-1][m-1]. Return the result modulo (10^9 + 7).
Example warehouse = [[1, 1, 0, 1], [1, 1, 1, 1]]
Verdict- All test cases passed
Candidate's Approach
No approach provided.
Interviewer's Feedback
No feedback provided.