Lecture 0 and 1

 0    11 fiche    kapi2304
laste ned mp3 Skriv ut spille sjekk deg selv
 
spørsmålet język polski svaret język polski
What are algorithms?
begynn å lære
Algorithms are some well-defined set of instructions, steps, or logic, written such that by following the steps, some specific task is accomplished.
The steps of algorithms design are:
begynn å lære
Obtain a description of the problem, Analyze the problem, Develop a high-level algorithm, Refine the algorithm by adding more detail, Review the algorithm
The major factor in speeding up your getting results is:
begynn å lære
The algorithm
Which is the most appropriate definition for recursion?
begynn å lære
A function that calls another execution instance of the same function.
Problems that can only be defined recursively can be solved using recursion.
begynn å lære
False
Which of the following statement is false?
begynn å lære
Every recursive function must have a return value.
Factorial function
begynn å lære
num * fact(num - 1)
Recursion is the process of describing an action in terms of itself.
begynn å lære
True
A recursive function may or may not have a recursive case.
begynn å lære
False
A factorial is the product of an integer and all the positive integers greater than it.
begynn å lære
False
Only problems that are recursively defined can be solved using recursion.
begynn å lære
False

Du må logge inn for å legge inn en kommentar.