Grokking the Coding Interview: Patterns for Coding Questions
Ask Author
Back to course home

0% completed

Vote For New Content
Anupriya Ramachandran
Didnt undertsand the comparison betwen end1 and end2 for incrementing the iterator

Anupriya Ramachandran

Jan 23, 2024

Code part : if intervals_a[i].end < intervals_b[j].end:         i += 1       else:         j += 1

Didnt understand this part of the code.

0

0

Comments
Comments
Shubham Vora
Shubham Voraa year ago

We are moving to the next interval in either arr1 or arr2 based on which interval finishes first.

On this page