Open rbucinell opened 6 years ago
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.
Upgrade to premium [http://links.dailycodingproblem.com/wf/click?upn=-2F03iMydR750DKx07F4BRwWErdzWeRmfVcT48gFYejU-2Bz6QcOxyCKetP6lYnXnpQi4KDQjG5YX4vCNlX3sdbfos06VT5YoRFkg4TrA1RVZWv0DZHacVnT6CRVrZdYdIbA_iscjqzEYz8RolbSgMQLtCXgsn2DW3ZG-2FJEHwGBaE-2FdWpJZdNBcRS0aLqmh5HstY8pg5yV8xwMTeMPnnJHxMnbHonK0a6fOoXUUQVxxN3yZ-2FKAHjj1kooxh0wHIKdWrEk5py19zvs1aJZJER2Px-2FsSFn3c-2B-2BbnRlvVpeiXp61dRdG4e5gpKgIA8sf2h8tfBQ7m1bV0IzTrhPBjVCmAcMYPatzd48icILckkUMtP48Wiw-3D] and get in-depth solutions to every problem.
If you liked this problem, feel free to forward it along! As always, shoot us an email if there's anything we can help with!
No more? Unsubscribe [http://links.dailycodingproblem.com/wf/click?upn=-2F03iMydR750DKx07F4BRwTq4x5HkPwxRhpDWfk1b7nXvgvDhSC78LLls-2Bvqs1KQvHGZzlxUHjTKmlyywaw1SP8zvxacCSMPWWHMDKM6wdS5Jl1I3MW0lfGAMY6ZLmyd0PQd5Ii-2F27lf3r61PXBXKc4STUNjbJNoKX2Dov-2Fr9Cag7e39ot-2F6XWTzq2lck7ESA_iscjqzEYz8RolbSgMQLtCXgsn2DW3ZG-2FJEHwGBaE-2FdWpJZdNBcRS0aLqmh5HstY8pg5yV8xwMTeMPnnJHxMnbNSxdsha9QfA-2FcR9gpngP1qtyuh9kJqCS9-2FuJAfp4KcaQYYP3orejC66q4Nco-2BYE7ZV4I5zrNWSS-2FaKx-2F-2BlxW2gu3iBwKGno5wpfIcH4eC2-2F-2B5ZBycqGy9h7blF-2BVBgZb-2FKnb8wMTzW7yu3TMeqeMy4-3D] .
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.
Upgrade to premium [http://links.dailycodingproblem.com/wf/click?upn=-2F03iMydR750DKx07F4BRwWErdzWeRmfVcT48gFYejU-2Bz6QcOxyCKetP6lYnXnpQi4KDQjG5YX4vCNlX3sdbfos06VT5YoRFkg4TrA1RVZWv0DZHacVnT6CRVrZdYdIbA_iscjqzEYz8RolbSgMQLtCXgsn2DW3ZG-2FJEHwGBaE-2FdWpJZdNBcRS0aLqmh5HstY8pg5yV8xwMTeMPnnJHxMnbHonK0a6fOoXUUQVxxN3yZ-2FKAHjj1kooxh0wHIKdWrEk5py19zvs1aJZJER2Px-2FsSFn3c-2B-2BbnRlvVpeiXp61dRdG4e5gpKgIA8sf2h8tfBQ7m1bV0IzTrhPBjVCmAcMYPatzd48icILckkUMtP48Wiw-3D] and get in-depth solutions to every problem.
If you liked this problem, feel free to forward it along! As always, shoot us an email if there's anything we can help with!
No more? Unsubscribe [http://links.dailycodingproblem.com/wf/click?upn=-2F03iMydR750DKx07F4BRwTq4x5HkPwxRhpDWfk1b7nXvgvDhSC78LLls-2Bvqs1KQvHGZzlxUHjTKmlyywaw1SP8zvxacCSMPWWHMDKM6wdS5Jl1I3MW0lfGAMY6ZLmyd0PQd5Ii-2F27lf3r61PXBXKc4STUNjbJNoKX2Dov-2Fr9Cag7e39ot-2F6XWTzq2lck7ESA_iscjqzEYz8RolbSgMQLtCXgsn2DW3ZG-2FJEHwGBaE-2FdWpJZdNBcRS0aLqmh5HstY8pg5yV8xwMTeMPnnJHxMnbNSxdsha9QfA-2FcR9gpngP1qtyuh9kJqCS9-2FuJAfp4KcaQYYP3orejC66q4Nco-2BYE7ZV4I5zrNWSS-2FaKx-2F-2BlxW2gu3iBwKGno5wpfIcH4eC2-2F-2B5ZBycqGy9h7blF-2BVBgZb-2FKnb8wMTzW7yu3TMeqeMy4-3D] .