Round 1
Questions:
Problem 1 - Easy
Given n number of kids, t toys and random number d from where the distribution will start, find the last kid who will get the toy. Assume kids are sitting in ascending order and in a circular way.
Input:
- N - The number of kids
- T - The number of toys
- D - Random number from where distribution should start
Example:
- N - 5, T - 2, D - 1
Answer for above is 2. As we will start from 1 and the kid getting the last toy is 2.
ans = (D + T - 1) % N;
Problem 2 - Medium
Given a string '1192', find the number of different words that can be formed.
Example:
- 1192
- 1,1,9,2 - aaib
- 11,9,2 - kib
- 1,19,2 - asb
Answer for above is 3.
Similar problem to Leetcode Decode Ways.
The assessment was for 120 minutes. I was able to solve both problems in 15 minutes. What are my chances of getting an interview call?
Candidate's Approach
No approach provided.
Interviewer's Feedback
No feedback provided.