I don't know if this is as simple as it sounds to me, but just iterate through the Diff pairs, and the position of the pair that has '\n' incremented by 2 will give the line on which the cursor should be, right?
In the above example, \n is present in the 0th pair of the diff list. So, the cursor should be on the second line. (0 + 2 = 2).
I doubt it is this simple, but who knows.
Disabled Categories are greyed out
This topic will be moved to the category
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.