Challenge 2: Sort a List
About the Challenge:
The task for this challenge was to write a program to sort a list of integers in ascending order using any programming language of your choice.
Solution:
I chose C++ to complete this challenge. Below is the C++ code that sorts a list of integers.
Additional Notes:
- std::sort Algorithm: The std::sort function in C++ is typically based on Quick Sort, but it may also use Merge Sort or Insertion Sort in specific cases. It is highly optimized and adapts to the input to provide the best performance, with an average time complexity of O(n log n).
- Ensure you have g++ installed on your machine. You can check the version by running: g++ --version
Log in or sign up for Devpost to join the conversation.