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
generate an algorithm for sorting an array of integers in descending order.
user
a sorting algorithm for an array of integers in descending order is as follows:

1. set a pointer to the first element in the array.
2. compare the element currently pointed at with the rest of the elements in the array.
3. swap the elements if a larger element is encountered. 
4. repeat steps 2-3 until the end of the array is reached.
5. move the pointer to the next element and repeat steps 2-4 until the array is sorted.
assistant