So I have been trying to implement a sorting algorithm in assembly. Unfortunatelly, I wasnt able to implement one of the "popular" ones, such as insertion sort, bubble sort and so on. At least not yet. I have instead managed to implement one by just writing the code that came to my head, and it works. However, I would very much like to know if this is an already existing algorithm (mind you, I suck at algorithms), and how good/bad it is. The algorithm works something like this:
- Traverse the whole arrray and find the smallest number.
- Switch the first number in the array with the smallest number found.
- Go back to the second entry in the array and traverse it again to find the smallest number.
- Switch it with the second, and so on...
This is a simplified description but I think you should be able to understand it. If I were to be honest, this algorithm does not sound pretty efficient to me. But I needed the opinion of people who are more knowledgeable at this then me.