Foundation of Computing Systems Lecture 2 Linked Lists
IT 60101: Lecture #22 Array vs. Linked List Array –elements are stored in a contagious memory locations –static data structure Linked list –adjacency between any two elements are maintained by means of links or pointers –dynamic data structures
IT 60101: Lecture #23 Linked List A linked list is an ordered collection of finite, homogeneous data elements called nodes where the linear order is maintained by means of links or pointers Single linked list, circular linked list, and double linked list
IT 60101: Lecture #24 Linked List Representation: Static
IT 60101: Lecture #25 Linked List Representation: Dynamic
IT 60101: Lecture #26 Linked List Representation: Dynamic
IT 60101: Lecture #27 Operations on Single Linked List Traversing a list –Searching for an element in a list Insertion of a node into a list Deletion of a node from a list Copy a linked list to make a duplicate Merging two linked lists into a larger list
IT 60101: Lecture #28 Single Linked List: Insertion Insertion steps –Get a new node from memory bank –Start from the header node –Manage links to Insert at front Insert at end Insert at any position
IT 60101: Lecture #29 Single Linked List: Insert at Front
IT 60101: Lecture #210 Single Linked List: Insert at End
IT 60101: Lecture #211 Single Linked List: Insert at Any Place
IT 60101: Lecture #212 Single Linked List: Deletion Deletion steps –Start from the header node –Manage links to Delete at front Delete at end Delete at any position –Return the deleted node to memory bank
IT 60101: Lecture #213 Single Linked List: Delete at Front
IT 60101: Lecture #214 Single Linked List: Delete at End
IT 60101: Lecture #215 Single Linked List: Delete at Any Place
IT 60101: Lecture #216 Single Linked List: Copy
IT 60101: Lecture #217 Circular Linked List
IT 60101: Lecture #218 Merging Two Circular Linked Lists
IT 60101: Lecture #219 Double Linked List
IT 60101: Lecture #220 Double Linked List: Insertion
IT 60101: Lecture #221 Double Linked List: Deletion
IT 60101: Lecture #222 Applications of Linked Lists Sparse matrix manipulation Polynomial manipulation Memory management
IT 60101: Lecture #223 Application of Linked List: Sparse Matrix
IT 60101: Lecture #224 Application of Linked List: Sparse Matrix
IT 60101: Lecture #225 Application of Linked List: Sparse Matrix
IT 60101: Lecture #226 Application of Linked List: Polynomial P(x) = a n x en + a n–1 x en–1 + · · · + a 1 x e1 P(x) = 3x 8 – 7x x x – 5
IT 60101: Lecture #227 Application of Linked List: Polynomial For polynomial manipulation See the book Classic Data Structures Chapter 3 PHI, 2 nd Edn., 17 th Reprint
IT 60101: Lecture #228 Application of Linked List: Memory For memory management See the book Classic Data Structures Chapter 3 PHI, 2 nd Edn., 17 th Reprint