Round 1: coding competition on Hackerrank
It has 3 questions.
Ticket booking system: βNβ people are standing queue to collect tickets. Due to high demand, 1 person gets 1 ticket at a time. For another ticket, person should go back to the end of queue. It takes 1 second to issue a ticket. Given an array A containing number of tickets required for each person. Find the time required to Iβth person to get all of his Ai number of tickets.
Given 2 arrays A, B. Return third array βCβ such that, Ci=Number of elements available in A such that Ai<Ci
XOR operation: Given x, y, k find maximal value of a XOR b and equal to βKβ such that x<=a<b<=y