user
Create an algorithm for sorting numbers
Response:
assistant
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.