MSG interview questions shared by candidates
You have 3 friends' busy time as follows. A = [8-9, 10:30-11, 5-6] B = [7-8, 3-4, 1-2,12:30-1] C = [5-6, 1-2, 8-9] You want to invite them for party. You have to find out free common time for invitation.
I couldn't solve the problem, but interviewer said that correct solution is Big O notation algorithm.
set their availability by bit, and do a AND on three numbers to get common availability? Complexity is O(n), where n is the number of friends.
See Interview Questions for Similar Jobs
- Security Guard
- Graphic Designer
- Registered Nurse
- Account Executive
- Mechanical Engineer
- Pharmaceutical Sales
- Sales Associate
- Human Resource
- Truck Driver