Linked List and Selection Sort
Linked List
Linked List It is a data structure
Linked List It is a data structure
Linked List It is a data structure Each element in a linked list is a node Each node consists of two parts: “pointer” and “data”
Linked List It is a data structure Dynamic Can grow and be pruned while the program is running
Linked List It is a data structure Dynamic Can grow and be pruned while the program is running
Linked List It is a data structure Dynamic Needs not to be stored contiguously in memory
Linked List It is a data structure Dynamic Needs not to be stored contiguously in memory Insert:
Linked List It is a data structure Dynamic Needs not to be stored contiguously in memory Remove:
Linked List It is a data structure Dynamic Needs not to be stored contiguously in memory Indexing
Selection Sort Select a “correct” value
Selection Sort Select a “correct” value Divide the input list into two parts: Sorted and Unsorted
Selection Sort Select a “correct” value Divide the input list into two parts: Sorted and Unsorted Initialize the sorted sublist is empty the unsorted sublist is the whole input list
Selection Sort Select a “correct” value Divide the input list into two parts: Sorted and Unsorted Initialize Start Sorting (Iteratively)
Selection Sort Select a “correct” value Divide the input list into two parts: Sorted and Unsorted Initialize Start Sorting (Iteratively) Finding the smallest value in the unsorted sublist
Selection Sort Select a “correct” value Divide the input list into two parts: Sorted and Unsorted Initialize Start Sorting (Iteratively) Finding the smallest value in the unsorted sublist Add this smallest value to the sorted sublist
Selection Sort Select a “correct” value Divide the input list into two parts: Sorted and Unsorted Initialize Start Sorting (Iteratively) Finding the smallest value in the unsorted sublist Add this smallest value to the sorted sublist Remove this value from the unsorted sublist
Selection Sort Select a “correct” value Divide the input list into two parts: Sorted and Unsorted Initialize Start Sorting (Iteratively) Finding the smallest value in the unsorted sublist Add this smallest value to the sorted sublist Remove this value from the unsorted sublist Go back to the first step until the unsorted sublist is empty
Selection Sort
Selection Sort
Selection Sort