as per the code snippet, the outer for loop should starts with 1
for (int i = 1; i < input.length; i++)
However the dry-run starts with 0. This is the correct behavior?
as per the code snippet, the outer for loop should starts with 1
for (int i = 1; i < input.length; i++)
However the dry-run starts with 0. This is the correct behavior?
If outer loop starts with 0 then number of iteration will be 5 not 4. For example 0,1,2,3,4 - please let me know if i am missing something
this depends on value of input.length.
if value of input.length is 5, loop will run for 0,1,2,3,4
if value of input.length is 4, loop will run for 0,1,2,3