How To Solve '876 Middle of the Linked List' on LeetCode - JavaScript Easy

preview_player
Показать описание
Do you need more help with coding?
════════════════════════════

Problem: 876 Middle of the Linked List
Language: Javascript
Difficulty: Easy

This is only one possible solution and may not be the most optimal.

Pseudo Code:

1. Create half variable and assign it to head
2. Create end variable and assign it to head
4. Return half

Time Complexity: O(n)
Space Complexity: O(1)
Where n is the number of nodes

Let's Connect 💯:
════════════════════════════
Рекомендации по теме
Комментарии
Автор

Thanks David, its a such good explanation.

richardselvaraj
visit shbcf.ru