The document contains C++ code to implement quicksort and print subsets of an array that sum to a given value. It defines functions for swapping elements, partitioning an array for quicksort, performing quicksort recursively, and printing subsets that sum to a given value from a sorted array. It then sorts an sample array using quicksort and prints subsets summing to 105, 100, and 95.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
32 views7 pages
Daa
The document contains C++ code to implement quicksort and print subsets of an array that sum to a given value. It defines functions for swapping elements, partitioning an array for quicksort, performing quicksort recursively, and printing subsets that sum to a given value from a sorted array. It then sorts an sample array using quicksort and prints subsets summing to 105, 100, and 95.