Ujjwal Sharmaujjwalsharma.hashnode.dev·Jul 5, 2024Slow and Fast AlgorithmThe Use-Case This algorithm is used in various cases and concepts when it comes to linked list, some use cases are as follows For finding the mid of the linked list in O(n) complexity. To Detect the loop in the linked list now let's discuss it's ...Discusslinked list
Vineeth Chivukulavineethchivukula.hashnode.dev·Jun 30, 2024Solving Linked List CycleTo see the question, click here. Naive Approach The idea is to use a HashSet to keep track of the nodes we've visited. We know there is a cycle if we encounter a node we've already seen. // TC: O(n) // SC: O(n) import java.util.HashSet; class ListN...Discusslinked list
yarnmiyarnmi.hashnode.dev·Jun 28, 2024[data structure] linked listlinked list 정의 데이터를 일렬로 저장하는 자료 구조 각 노드는 값이 저장된 데이터와 다음 노드를 가르키는 포인터(참조)로 구성됨 linked list와 array의 차이 arraylinked list저장 방식메모리 상에서 연속적으로 저장된다.메모리 상에서 각 노드가 흩어져 저장된다.접근 속도인덱스로 빠르게 조회할 수 있다.head 노드부터 순차적으로 탐색해야해서 느리다삽입과 삭제연속적으로 저장되어 있어서, 중간 요소 삽입하거나...Discussdata structures
Lu Hanlutechjourney.hashnode.dev·Jun 25, 2024Chapter 2 Linked List203. Remove Linked List Elements(easy) Given the head of a linked list and an integer val, remove all the nodes of the linked list that has Node.val == val, and return the new head. 使用虚拟头节点,来统一删除规则. /** * Definition for singly-linked list. * public...Discusslinked list
Vineeth Chivukulavineethchivukula.hashnode.dev·Jun 25, 2024Understanding In-place Reversal of a Linked ListThe In-place Reversal of a Linked List is a common technique for solving linked list problems. It involves reversing the linked list without using extra space, typically by manipulating the pointers of the nodes directly. Process Initialization: ...Discussinplace
Vineeth Chivukulavineethchivukula.hashnode.dev·Jun 23, 2024Understanding Java LinkedList for DSAA LinkedList in Java is another implementation of the List interface, but unlike ArrayList, it is a doubly-linked list. This means each element in the list is a node that contains a reference to the next and previous nodes. Key Characteristics Doubl...Discusslinked list
Anushka Joshiloops.hashnode.dev·May 19, 2024Doubly Linked listA doubly linked list (DLL) is a type of linked list where each node has a pointer to both the previous node and the next node. SNOperationDescription 1Insertion at beginningAdding the node into the linked list at beginning. 2Insertion at end...DiscussIntroduction to Data structures and algorithms2Articles1Week
Fatima Jannatmahia.hashnode.dev·May 18, 2024Python Linked Lists : Easy Steps to Get StartedEver wondered how efficiently Python handles data connections? Linked lists are a powerful data structure for managing connections and dynamic memory. Unlike arrays, they store elements in separate nodes linked together. Let's explore how Python effi...Discuss·36 readsPython Data Structure and AlgorithmPython
Jyotiprakash Mishrablog.jyotiprakash.org·May 9, 2024DSA: Linked ListsWhat are Linked Lists? Linked lists are a fundamental data structure in computer science used to store collections of elements. Unlike arrays, which store elements in contiguous memory locations, linked lists consist of nodes where each node contains...Discuss·99 readsdata structures
Anushka Joshiloops.hashnode.dev·May 4, 2024Linked List Data StructureA linked list is a crucial data structure in the realm of computer science. It is composed of nodes, with each node holding both data and a reference (link) pointing to the subsequent node in the sequence. This unique structure facilitates dynamic me...DiscussIntroduction to Data structures and algorithms2Articles1Week