DSA Problems and their solutions.
View the Project on GitHubvaibhavvikas/dsa-problems
def middleNode(head): if not head.next: return head slow = fast = head while fast and fast.next: slow = slow.next fast = fast.next.next return slow