Importance of time

give hint for importance of time problem

hello @shrutikatyal

  • The Idea is to Store the Calling order in Queue and the ideal order in an Array.
  • Then compare front element of the queue with the ideal order.
  • If it matches then increment the time and remove the element.
  • Else, Dequeue the element and enqueue it again.
  • The loop will run till the queue is consumed totally