
CTECH-02.02.2024-FN
Authored by CCC info@ccc.training
English
Professional Development
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What is dynamic programming in data structures?
A technique for designing efficient algorithms by breacking down a problem into smaller subproblems
A way to store and organize data in a computer program
A process of optimizing memory usage in a program
Amethod for creating algorithms that use only constant space
2.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Consider the recursive implementation to find the nth fibonacci number: int fibo(int n) if n <= 1 return n return __________ Which line would make the implementation complete?
fibo(n) + fibo(n)
fibo(n) + fibo(n – 1)
fibo(n – 1) + fibo(n + 1)
fibo(n – 1) + fibo(n – 2)
3.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Suppose we find the 8th term using the recursive implementation. The arguments passed to the function calls will be as follows: fibonacci(8) fibonacci(7) + fibonacci(6) fibonacci(6) + fibonacci(5) + fibonacci(5) + fibonacci(4) fibonacci(5) + fibonacci(4) + fibonacci(4) + fibonacci(3) + fibonacci(4) + fibonacci(3) + fibonacci(3) + fibonacci(2) : : : Which property is shown by the above function calls?
Memoization
Optimal substructure
Overlapping subproblems
Greedy
4.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
If a problem can be solved by combining optimal solutions to non-overlapping problems, the strategy is called _____________
Dynamic programming
Greedy
.
Divide and conquer
Recursion
5.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
The following sequence is a fibonacci sequence: 0, 1, 1, 2, 3, 5, 8, 13, 21,….. Which technique can be used to get the nth fibonacci term?
Recursion
Dynamic programming
A single for loop
Recursion, Dynamic Programming, For loops
6.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What is the space complexity of the recursive implementation used to find the nth fibonacci term?
O(1)
O(n)
O(n2)
O(n3)
7.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Which of the following is/are property/properties of a dynamic programming problem?
Optimal substructure
Overlapping subproblems
Greedy approach
Both optimal substructure and overlapping subproblems
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?