Let's learn your second algorithm.
Suppose you have a bunch of music on your computer. For each artist, you have a play count. You want to sort that list from most to least played, so that you can rank your favorite artists. How can you do it?
One way is to go through the list and find the most-played artist. Add that artist to a new list. Keep doing this, and you'll end up with a sorted list.
Recap what we have learned:
Your computer's memory is like a giant set of drawers.
When you want to store multiple elements, use an array or a list.
With an array, all your elements are stored right next to each other.
With a list, elements are strewn all over, and one element stores the address of the next one.
Arrays allow fast reads.
Linked lists allow fast inserts and deletes.
All elements in the array should be the same type (all ints, all doubles, and so on).