Finding intersecting node between two lists. (Data Structures and Algorithms #33)(Linked List #7)

preview_player
Показать описание
This video explains how to find the intersecting node between two merged linked lists. There are two solutions to the problem:

1.) Using HashSet.
Time Complexity: O(n)
Space Complexity: O(n)
2.) By finding the length of the linked lists.
Time Complexity: O(n)
Space Complexity: O(1)
Рекомендации по теме
Комментарии
Автор

There are some chances that there are some duplicate element then the logic doesn't work.

immaculateness
visit shbcf.ru