MABS Institution
11th Computer Science Monthly Test -3 ( Iteration and recursion )-Aug 2020
-
-
-
-
-
-
-
-
-
-
-
-
-
-
A knockout tournament is a series of games. Two players compete in each game; the loser is knocked out (i.e. does not play anymore), the winner carries on. The winner of the tournament is the player that is left after all other players have been knocked out. Suppose there are 1234 players in a tournament. How many games are played before the tournament winner is decided?
-
Write a note on Iteration.
-
What is the use of repeating the same action again and again?
-
Show that p - c is an invariant of the assignment. P, C : = P + 1, C + 1
-
Write a note on Recursion.
-
How will you solve a problem using recursion?