Could you please help me answering these three question
2) Write out code that prints out all pairs of numbers between 0 and 8. (e.g. 00, 01, 02, …, 86, 87,
88). What is the Big-O runtime for the general case (numbers between 0 and n)?
3) Modify the code from problem 2 to print out all pairs of numbers between 0 and 8 in which the
left number is always smaller than the right number (i.e. print out pairs ij such that i < j )
4) Explain why number 3 has the same Big-O runtime in the general case as number 2
Last edited on
Did you write out the code ?
Write out the algorithm for doing this, and it'll be pretty obvious