
Mathematical Analysis of Non recursive Algorithms
Authored by Niranjani Vijayan
Professional Development
Professional Development
Used 9+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
5 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Examples of O(1) algorithms are______________.
A. Multiplying two numbers.
B. assigning some value to a variable
C. displaying some integer on console
D. All of the above
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Examples of O(n2) algorithms are______________.
A. Adding of two Matrices
B. Initializing all elements of matrix by zero
C. Both A and B
D. Neither A nor B
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The complexity of three algorithms is given as: O(n), O(n2) and O(n3). Which should execute slowest for large value of n?
A. O(n)
B. O(n2)
C. O(n3)
D. All will execute in same time.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Express the formula (n-1)*(n-5) in terms of big Oh notation
O(1)
O(log n)
O(n)
O(n2)
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
EXAMPLE 1 Consider the problem of finding the value of the largest element in a list of n numbers. For simplicity, we assume that the list is implemented as an array. The following is pseudocode of a standard algorithm for solving the problem.
ALGORITHM MaxElement(A[0..n − 1])
//Determines the value of the largest element in a given array
//Input: An array A[0..n − 1] of real numbers
//Output: The value of the largest element in A maxval ← A[0]
for i ← 1 to n − 1 do
if A[i] > maxval maxval ← A[i]
return maxval
Is the algorithm correct for the above question?
yes
no
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?
Similar Resources on Wayground
10 questions
Intro to the 6S Pyramid
Quiz
•
Professional Development
10 questions
SISTEMAS ELÉCTRICOS INICIO
Quiz
•
Professional Development
10 questions
Certificación Remark Davivienda
Quiz
•
Professional Development
10 questions
Review TKMRPI I
Quiz
•
Professional Development
10 questions
1. Intro to Computer Vision
Quiz
•
Professional Development
10 questions
Recap Quiz - CRAFT Experiences - Oberoi
Quiz
•
Professional Development
10 questions
2.1 Conceitos Básicos em Manutenção - Évio
Quiz
•
Professional Development
10 questions
Be an AB Expert
Quiz
•
Professional Development
Popular Resources on Wayground
7 questions
History of Valentine's Day
Interactive video
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
15 questions
Valentine's Day Trivia
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade