Easiest Sort Algorithm Ever Seen: Bubble Sort Implementation
Easiest sort algorithm ever seen. Iterate through list, for each element, find max value and push to last index, then find second max value.
Easiest sort algorithm ever seen. Iterate through list, for each element, find max value and push to last index, then find second max value.
Reversing a linked list by swapping `next` pointers. Iterate through the list, saving `current.next` in `next`, then swap `current.next` with `prev`. Repeat until `current.next` is null.