This commit is contained in:
Electrominch
2022-10-06 00:46:00 +03:00
parent 062e03bdbf
commit cb2f99c3a8
21 changed files with 434 additions and 4 deletions

View File

@@ -0,0 +1,15 @@
namespace _876._Middle_of_the_Linked_List;
public class Solution
{
public ListNode MiddleNode(ListNode? head)
{
ListNode result = head!;
while(head?.next != null)
{
head = head?.next?.next;
result = result!.next!;
}
return result;
}
}