Chehak Batrachehakbatra.hashnode.dev·Nov 26, 2023The 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...1 likedata structures
Chehak Batrachehakbatra.hashnode.dev·Nov 26, 2023Introduction 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...2 likes·26 readsDSAwithChehak