Question: How would I write a Quicksort algorithm that takes in a C string array, its size and a boolean variable which indicates to whether sort
How would I write a Quicksort algorithm that takes in a C string array, its size and a boolean variable which indicates to whether sort it by length or by alphabetical order.
Only libraries that can be used are stdbool.h and string.h
For the boolean part, if the boolean is true then it will sort it by length which is
Apple, Banana, Carrot,
If not then, it would be
Apple, Carrot, Banana.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
