DoorDash OA new grad
Anonymous User
637
  1. There are m jobs to schedule on n processors. A schedule is balanced if the difference between the number of jobs scheduled on any two neighboring processors does not exceed 1.
    The kth processor is the most efficient, and thus, the maximum number of jobs should be scheduled on that processor. Find the maximum number of jobs that can be scheduled on the kth processor, such that the overall schedule remains balanced.
    Note: Each processor must have at least one job scheduled.

  2. The path of the river is represented by the n* m matrix. The river starts at point (0, 0) and has a natural tendency to flow downwards and rightwards.
    There are some obstacles in the path of the river.
    The empty cells are represented by, and the obstacle is represented by '#'. You are swimming in the river. While moving in the direction of the river flow, i.e. rightwards or downwards, it requires no energy. However, moving against the flow of the river, i.e., leftwards or upwards requires 1 unit of energy.
    The goal is that be currently at the given initial coordinates and to reach the final coordinates with the minimum possible energy.
    It is guaranteed that there are no obstacles on the initial and final coordinates.
    Determine the minimum possible energy required to reach the destination, or tell if it is impossible to reach the destination.
    Return -1 if it is impossible to reach the destination.

Comments (4)