• + 3 comments

    I didnt well understand that what will happen if b+1 is out of array bounds?

    • + 0 comments

      it can't be out of bounds, it saids that b>n in the problem statement.

    • + 0 comments

      if b+1 > n then the the addition of k from position a will continue till the last element of the array.

    • + 0 comments

      Hi,

      I have uploaded a video tutorial which can help you to understand the problem as well as logic.

      Here is the video tutorial for my solution O(n+m) complexity.

      https://youtu.be/hDhf04AJIRs

      Would really appreciate your feedback like, dislike , comment etc. on my video.