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
create an algorithm for sorting numbers
user
this algorithm can be used to sort an array of integers from the lowest to the highest: 
1. begin looping through the array and check if the current number is less than the number in its former position. 
2. if yes, switch the two numbers. 
3. repeat steps 1 and 2 until the array is sorted.
assistant