Codility test:
Status: Passed
Virtual Onsite:
Status: Rejected
** Codility:**
1. https://leetcode.com/problems/sign-of-the-product-of-an-array/
2. Maximum possible value by inserting '5'
examples:
input: 1234 -> output: 51234
input: 7643 -> output 76543
input: 0 -> output 50
input: -661 -> output -5661
3. Improve an existing program that runs very slow for large input size because it was O(N^2). Optimize the program so that it runs on that large input size. The program was trying to accomplish the following task - "Find the maximum absolute difference of two indexes Abs(i - j) in a given array A so that A[i] = A[j]". The existing solution was using two for loops and check if A[i] = A[j] and update the maximum difference of abs(i-j).
I was able to solve all those three questions and write down my thought process, runtime and space complexity. I got the result on the same day that I cleared the interview.
** Virtual Onsite** (Due to NDA, not putting the exact questions)
All Coding + Behavioral:
Leetcode hard: Similar to find the frequency of a specific digit in a base 10 number.
Leetcode medium: Variation of desigining some api functions on cache.
Probably leetcode easy: Similar to finding cumulative sum for a given index
Probably leetcode medium: Similar to finding factorial and exclude based on condition