Back2Lobbyreid.hashnode.dev·Apr 23, 2024Linked Lists - Doubly Linked ListAlright, we covered singly linked list in the previous article, now it's time for a doubly linked list, which to be honest isn't that different much from a singly linked list. The only difference is we that each node contains a reference to the previ...DiscussDSADSA
Chetan Dattachetan77.hashnode.dev·Apr 21, 2024328. Odd Even Linked ListProblem Given the head of a singly linked list, group all the nodes with odd indices together followed by the nodes with even indices, and return the reordered list. The first node is considered odd, and the second node is even, and so on. Note that ...DiscussLeetcode#linkedlists
Chetan Dattachetan77.hashnode.dev·Apr 10, 2024160. Intersection of Two Linked ListsProblem Statement Given the heads of two singly linked-lists headA and headB, return the node at which the two lists intersect. If the two linked lists have no intersection at all, return null. For example, the following two linked lists begin to int...DiscussLeetcode#linkedlists
Chetan Dattachetan77.hashnode.dev·Mar 23, 202419. Remove Nth Node From End of ListProblem Given the head of a linked list, remove the n<sup>th</sup> node from the end of the list and return its head. (link) Example 1: Input: head = [1,2,3,4,5], n = 2 Output: [1,2,3,5] Example 2: Input: head = [1], n = 1 Output: [] Example 3: In...DiscussLeetcoderemove-nth-node-from-end-of-list
Gulshan Kumarperfinsights.hashnode.dev·Mar 23, 2024Reverse Linked ListGiven the head of a singly linked list, reverse the list, and return the reversed list. LeetCode Problem - 206 class Solution { // Method to reverse a singly linked list public ListNode reverseList(ListNode head) { // Initializing var...DiscussJava Solution#linkedlists
Md.Naimur Rahman (Navil)navilbyte.hashnode.dev·Mar 15, 2024Data Structure & Algorithm lDiscuss·1 like·386 readsUIU BSCSE CoursesDsa 1
Chetan Dattachetan77.hashnode.dev·Mar 10, 2024141. Linked List CycleProblem Given head, the head of a linked list, determine if the linked list has a cycle in it. There is a cycle in a linked list if there is some node in the list that can be reached again by continuously following the next pointer. Internally, pos i...DiscussLeetcodedetect loop
Jessie Yujessieyu1.hashnode.dev·Mar 10, 2024Leetcode 142. Linked List Cycle IIGiven the head of a linked list, return the node where the cycle begins. If there is no cycle, return null. There is a cycle in a linked list if there is some node in the list that can be reached again by continuously following the next pointer. Inte...DiscussLeetcodeleetcode
AK Codingakcoding.hashnode.dev·Mar 8, 2024Unlocking the Power of Linked List: A Comprehensive Guide to the Data StructureTable of Contents Introduction to Linked List Basic Characteristics Linked List Comparison of Linked List with Other Data Structures Types of Linked List Singly linked list Doubly linked list Circular Linked List Circular Doubly Linked List...Discuss#linkedlists
Jessie Yujessieyu1.hashnode.dev·Mar 8, 2024Leetcode 19 Remove Nth Node From End of ListGiven the head of a linked list, remove the n<sup>th</sup> node from the end of the list and return its head. Example 1: Input: head = [1,2,3,4,5], n = 2 Output: [1,2,3,5] Example 2: Input: head = [1], n = 1 Output: [] Example 3: Input: head = [1,...DiscussLeetcodeleetcode