Ad
  • Default User Avatar

    Doesn't this take O(n^2) time though?

  • Default User Avatar

    May I bother someone to discuss the syntax for index incrementation technique here?
    I learned, through this exercise that (*i1)++ != *i1++; however, I'm still not entirely clear why.
    I think that because no assignment is being made to or from *index1 in the incrementation area of the for loop, that ++i is identical in function to i++.
    I also think that *i1++ increments the pointer (address?) and (*i1)++ increments the dereferenced value of the pointer.
    I guess my question is whether I'm uderstanding correctly, and whether ++*index1 instead of *index1++ has different syntax rules.