• + 1 comment

    I have written array[b] in the code. Since b can have a maximum value of N (according to the problem description), we must have N+1 elements so that array[b] = array[N] does not crash the program.

    HackerRank solutions.

    • + 0 comments

      thanq.... i got it..:)