Skip to main content

LinkedList

MikeLess than 1 minuteleetcodelinkedlist

About Linked List

Linked list is a linear structure linked together by a series of pointers, with each node consisting of two parts, a data field and a pointer field.
Linked List

Type of Linked List

  • singly linked list
    Singly Linked List
  • doubly linked list
    Doubly Linked List
  • circular singly linked list
    Circular Singly Linked List
  • circular doubly linked list
    Circular Doubly Linked List

Linked List Memory Allocation

The nodes in a linked list are not continuously distributed in memory, but are scattered at certain addresses in memory.
Linked List Memory Allocation

Operation of LinkedList

Add

Singly Linked List Add Node
Doubly Linked List Add Node

Delete

Singly Linked List Delete Node
Doubly Linked List Delete Node

Exercise

Remove Linked List Elements

203: Remove Linked List Elements

Design Linked List

707: Design Linked List

Reverse Linked List

206: Reverse Linked List

Swap Nodes in Pairs

24: Swap Nodes in Pairs

Remove Nth Node From End of List

19: Remove Nth Node From End of List

Intersection of Two Linked Lists

160: Intersection of Two Linked Lists

Linked List Cycle

141: Linked List Cycle
142: Linked List Cycle II

Summary