Inspiration
Many a time, there is a list of participants in unsorted order for competition even at the time of price ceremony which makes the people think and makes them said according to their rank even after winning.
What it does
Together we coded a small program in which there is sorting of a Random text file we provide and in the output, we get the sorted list ( in C its array)
How we built it
First, we define a swap function which helps in interchanging the elements in the file in case of the condition comes true. Secondly, we are making another function for partition as we are using quick sort algorithm. And the last function as Quick Sort Function that invokes the other function indirectly...
At last, we are providing the inputs as the random file where we first call the function and then invokes the input in the function element by element.
As an output, we first print the input provided and then display the sorted array...
Challenges we ran into
We have brainstormed together and came up with the quick sort algorithm which is the fastest in terms of sorting and also has a good space complexity. Before that, we could have used bubble sorting but the time increases and space complexity is also not good. At the time of coding, we faced a challenge of importing the text file and passing it into the partition function... But we were successful in sorting the challenges too😁
What we learned
Learned about different algorithms and time and space complexities
What's next for Code-2-Sort
Make the problem more useful by making in the import file name as a string...
Log in or sign up for Devpost to join the conversation.