Tag: insertion_sort
Insertion Sort List # 3rd attempt
Date: 2/3/2024Tags:algorithmsleetcodeinsertion_sortThe journal entry titled "Insertion Sort List # 3rd attempt" documents the author's third attempt at solving the Insertion Sort List problem, which involves using a dummy node to create a new list and iteratively inserting elements from the old list into the appropriate positions in the new list using a while loop.
Insertion Sort List #2 attempt
Date: 1/26/2024Tags:algorithmsleetcodeinsertion_sortThe journal entry titled "Insertion Sort List #2 attempt" explains the process of solving the problem using an insertion sort algorithm with a given code and mentions learned concepts such as using two lists, utilizing a pointer and dummy node, cutting off nodes from the old list, and moving the pointer to the next node before cutting off the current element.
Insertion Sort List
Date: 1/26/2024Tags:algorithmsleetcodeinsertion_sortThis journal entry explains the solution to the Insertion Sort List problem using a code that iterates through the linked list and inserts each element into its proper place based on its value.
Insertion sort v.s. Selection sort
Date: 1/25/2024Tags:algorithmsselection_sortinsertion_sortThe journal entry compares the time complexity of selection sort and insertion sort, highlighting that selection sort takes N^2/2 time while insertion sort takes N^2/4 time, and explains the difference in their comparison processes.