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 for sorting a group of numbers.
user
this algorithm sorts numbers in ascending order using bubble sort:
1. compare the first two numbers and swap if the first number is larger than the second
2. compare the next two numbers and swap if the second number is larger than the third
3. repeat until all numbers have been compared and ordered
4. repeat steps one through three until all numbers have been ordered correctly
assistant