



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




for n iterations { find the maximum in the remaining values [this takes about n iterations] append the max to the set of sorted values delete the max from the original set }
factorial(n) = 1 if n== n * factorial(n-1) if n>
int factorial(int n) { if (n == 0) { return(1); } else { return(n * factorial(n-1)); } }
add x y num sub y x num
#include