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 to sort numbers from least to greatest
user
this algorithm will sort numbers from least to greatest. 

step 1: begin with an array of unsorted numbers. 
step 2: set two variables; "min" and "index". 
step 3: iterate through the array. 
step 4: compare each value with "min". 
step 5: if the value is less than "min", update min and record the index of the value. 
step 6: after each iteration, swap the value at the index of "min" with the value at the beginning of the array. 
step 7: the beginning of the array is now the smallest value. 
step 8: repeat steps 3-7 for the remaining elements until everything is in order.
assistant