Day
5 experiences · Other (5)
5 entries
Day [0/6] {Intersection of two Lists}
Day 1 of 2000 Days — Starting a LeetCode Challenge
30 Day LeetCode Streak!
Day One Thousand
Day 1 | System Design: Clash Royale 🏰
Day [0/6] {Intersection of two Lists}
Interview Experience
https://preview.redd.it/8v35lr332hog1.png?width=1366&format=png&auto=webp&s=02a5b948ccb7186381ef91271f9fdfc15d12659a in the most optimal solution, 1. I pointed at both the heads and started iterating till one of the pointers reach the end node. 2. There i found the 2nd pointer which began from the longer list was d distance behind. i.e it needs to travel d distances to reach to coincide 3. i sent the front pointer to the alternate head now iterated again. 4. Later found both got the same head start. i.e the one behind traveled d distances and same with the ahead pointer then they intersected