You are viewing a single comment's thread. Return to all comments →
Since the orger is lost after sorting..how can binary search retrun the actual index.
You can add it to an object with cost/index (struct or class)
Create an array of original indexes and sort them instead of the original values.
then u get to add n space?