Assignment 13
Insertion sort and selection sort are both O(N2); heapsort is O(N log N), theoretically better than O(N2). Add Heapsort to your sort comparison program and see whether it performs better in practice. How does it compare in terms of number of comparisons and swaps?
Even though we haven’t yet covered how addition and subtraction are implemented for the BigInt class, you should be able to add and implement the increment (++) and decrement (--) for BigInts, by defining them in terms of other members of the class. You’ll be implementing only the pre-increment and pre-decrement forms, which return the value of the BigInt after the increment/decrement has been performed. Use the following prototypes:
BigInt operator++();
BigInt operator--();