Pergunta de entrevista da empresa Microsoft

Given two one directional linked list find if they merge and the node where they merge. Write a pseudo-code. Make solution with O(1) in space and O(n) in time where n is longest list length.

Resposta da entrevista

Sigiloso

12 de jun. de 2018

Solution is simple and straightforward. Can be found on internet. Advance on longest list until remaining length match the shortest. Continue compare nodes and advance on both until reach the end or find shared node.