Skip to content

Latest commit

 

History

History
13 lines (7 loc) · 534 Bytes

020.md

File metadata and controls

13 lines (7 loc) · 534 Bytes

Daily Coding Problem: Problem #20 [Easy]

Good morning! Here's your coding interview problem for today.

This problem was asked by Google.

Given two singly linked lists that intersect at some point, find the intersecting node. The lists are non-cyclical.

For example, given A = 3 -> 7 -> 8 -> 10 and B = 99 -> 1 -> 8 -> 10, return the node with value 8.

In this example, assume nodes with the same value are the exact same node objects.

Do this in O(M + N) time (where M and N are the lengths of the lists) and constant space.