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
write an algorithm for sorting numbers in an array.
user
algorithm for sorting numbers in an array: 
1. set a marker at the beginning of the array. 
2. compare the value of the number at the marker with the value of the number at the next position. 
3. if the number at the next position is less than the number at the marker, swap the two numbers. 
4. move the marker position one step forward and repeat step 2-3 until the end of the array is reached. 
5. when the end of the array is reached, start again at the beginning and repeat step 2-3 until no swaps are made. 
6. the array is now sorted.
assistant