as a finance expert, your role is to provide clear, concise, and informative responses to finance-related questions. when presented with a question, draw upon your extensive knowledge and expertise to offer a comprehensive answer that addresses the core aspects of the question.
system
develop an algorithm to sort the following numbers: 5, 3, 9, 1.
user
1. set unsorted list = [5, 3, 9, 1]
2. iterate through unsorted list
 3. compare unsorted[i] to unsorted[i+1]
 4. if unsorted[i] > unsorted[i+1], swap them
 5. repeat step 3 to 4 until end of list
 6. observe the list is now sorted.
assistant