Ad
  • Custom User Avatar

    OP solved it, closing

  • Custom User Avatar

    I know this is old but if it were in the while loop, then it would return the list as it is after the 1st loop because how the return statement works. once you return something, you are exiting out of the program and it does not go back. You only want it to return once you know you have the full correct answer at that point.

  • Custom User Avatar

    I had a quick question this: const int array[length]. If the array was 5 elements long then this would give you const int array[5], which would be out of range right? Please let me know if I am incorrect. ALso, are we supposed to alter the parameters at all or is it expected to use what is there?

    Thanks.

    edit: I am working on the C version.