CBChehak Batrainchehakbatra.hashnode.dev·Nov 26, 2023 · 2 min readThe Middle of a Linked ListProblem Statement Given the head of a singly linked list, return the middle node of the linked list. If there are two middle nodes, return the second middle node. Approach We will initialise two pointers, slow and fast with the head of the linked lis...00
CBChehak Batrainchehakbatra.hashnode.dev·Nov 26, 2023 · 3 min readIntroduction to Singly Linked ListIntroduction A linked list is a collection of nodes and is a linear data structure. The elements are not stored in contiguous memory locations. Each node has a single descendant. There is no memory wastage as we can create and delete nodes at the run...00