We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e456114 commit 66f39a4Copy full SHA for 66f39a4
src/linked-list/intersection.js
@@ -68,7 +68,7 @@ function intersection(list1, list2) {
68
for(let i = 0; i < list2.size() - list1.size(); i++) { i2 = i2.next; }
69
}
70
71
- while(i1 && i2 && i1 !== i2) {
+ while(i1 !== i2) {
72
i1 = i1.next;
73
i2 = i2.next;
74
0 commit comments