We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
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.
Array Manipulation
You are viewing a single comment's thread. Return to all comments →
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.