This seems like a real issue. If, as I can see by several hints, we are to store the line number as a sorted list, how do we distinguish between multiple instances of the word on the same line. In fact, as pointed out in the previous post, how do we know when we are searching for a word on line 15, which instance we are starting with (the last instance, first, second?). It seems like "line number" is not sufficient, we need another coordinate...
Any thoughts? |