home..
2024 Algo- rhythmic
April 2024 (279 Words, 2 Minutes)
Types of sorting
- Insertion sort
- Quick sort
- Bubble sort
- Merge sort
- Selection sort
Insertion sort
- Compare element to elements checked before and inserts to correct position accordingly
- One of the most simple algorithms, but definitely not the fastest
- Sorted subarray once a section has been put in order
- Worst case scenerio O(n^2) time complexity
- Best case scenerio O(1) if already fully sorted
- Comments: creative performance with a clear way of showing how the list of people is being sorted by pool noodle size
Quick sort
- Takes one element (pivot) and compares it to all the other elements and splits into 2 subarrays
- 2 subarrays –> one less than the pivot and one greater
- Repeated and done recursively
- O(logN) time complexity –> efficient sorting
- Comments: members were enthusiastic, but it wasn’t as clear as it could be with the orange juice sorting (could use numbers). Good use of music to set a tone
Bubble sort
- Element compares itself to the next in the list and moves if needed
- Might need to soft a second time to fully sort
- Best case: O(n)
- Worst case: O(n^2)
- Comments: Very easy to notice the sorting because of the labeled numbers on the hearts. Had a theme throughout the entire time and was easy to understand.
- No image I forgot 😭
Merge sort
- Time complexity: O(N*logN)
- Split into several subarrays to sort independently, then merge one by one afterwards
- For example, split until sets of 2, sort the sets of 2, and finally begin to merge at the end
- Comments: I could see the numbers well and they simplified a more complex algorithmn.
- No image I forgot 😭
Selection sort
- Move through the list and find the minimum value is selected from the list and moved to the beginning
- The first part of the list is already sorted, so then a new minimum can be found and shifted over to the left again
- Time complexity: O(N^2)
- Comments: Funny and well done. It was hard to see the numbers but I could still see numbers shifting
Conclusion
- Algo-rhythmic was a fun learning experience where I was able to visualize various sorting algorithms which I have used before
- My favorite algo-rhythm was the bubble sort which was super easy to understand
- This event also gave me a bit of insight into how fun CSA will be
- I would like to appreciate all of the CSP/CSA students who put themselves out there and made such a fun event!