X Tutup
Skip to content

Latest commit

 

History

History
33 lines (22 loc) · 1.69 KB

File metadata and controls

33 lines (22 loc) · 1.69 KB

Godot Array Sorting Algorithm

This is an attempt to use classic sorting algorithm to sort arrays in godot 4.

I started learning sorting algorithm in collage, so I decide to put my knowledge to good use.

I am not a good programmer currently, and feel free to pull request to help make this project better.

What is in the project

Currently there are 6 sorting algorithm, all of them have ascending sort and descending sort, you cancheck the DES on the HUD to switch.

Good old and the best sorting algorithm

Very easy to achieve this algorithm but the performance sometimes are very bad

Good for small array bad for large array

Just insertion sort, but a little bit faster

An in-place comparison sorting algorithm. It inefficient on large lists, and generally performs worse than the similar insertion sort.

heapsort is a comparison-based sorting algorithm which can be thought of as "an implementation of selection sort using the right data structure."

About the Timer

Since GDscript is base on Python, doing large add is so slow, the timer's result only contain the time used to sort, so if the game freeze, it's most likely Godot's fault (lol)

X Tutup