Company: Ibm_23sep
Difficulty: medium
Task Processing Order Problem Description You have a queue of n tasks numbered from 1 to n , where each task requires time[i] units to complete. You will process tasks in order from 1 to n . In one turn, you can process at most m units of time for a task. If a task needs more than m units, it is moved to the back of the queue with its remaining time. A task is removed from the queue once it is completed. Implement a function that finds the order in which tasks are completed. The function getTaskOrder will take two inputs: int time[] : the time required for each task to complete int m : the maximum units of time any task you can process in one turn The function should return an array of integers representing the order in which tasks are completed. Examples Example 1: Input: time = [1,2,3], m = 1 Output: [1,2,3] Explanation: Tasks are processed one by one. Since m = 1 , each task is completed in a single turn as their required times are 1, 2, and 3 respectively, and m is sufficient for e