Ad
  • Custom User Avatar

    Ah, I see. Sorry about that. "In place" usually means "by modifying the original object". And "original object" usually means "the object containing the data"; that data or object could be modified, but it would be modified on the same object, rather than making a new one and adding all the data there.

    Thanks for your patience.

  • Default User Avatar

    Well, then I misinterpreted the meaning of 'original'. For me, when I read 'original', it means the exact same array (same information, same order etc), so not in-place modification.
    I understand now, thanks.

  • Custom User Avatar

    I'm not sure what you mean by "when called without reverse". As in the example, the returned array (the original array) is reversed. The reversal should be done in-place, modifying the original array and returning it.

  • Default User Avatar

    I'm not sure if I'm mistaken, but you're saying original array should be returned when called without reverse, yet you expect to be reversed in place.
    The protoype I wrote does not modify in place, if you want the original array.. Either something is wrong or I'm reading it the wrong way.