DSA - Infosys Power Programmer

DSA - Infosys Power Programmer

University

50 Qs

quiz-placeholder

Similar activities

CPSC 131 midterm review

CPSC 131 midterm review

University

45 Qs

Logika dan Algoritma P15 (Quiz)

Logika dan Algoritma P15 (Quiz)

University

50 Qs

SMK Binaiswa 02 Cililin

SMK Binaiswa 02 Cililin

11th Grade - University

55 Qs

Computer Systems and Algorithms Quiz

Computer Systems and Algorithms Quiz

10th Grade - University

50 Qs

Examen - Computación-Básico

Examen - Computación-Básico

University

51 Qs

Ôn Tập CUỐI KÌ I Tin 8

Ôn Tập CUỐI KÌ I Tin 8

8th Grade - University

54 Qs

Quiz

Quiz

University

50 Qs

Data Structures and Algorithm - Final Examinations Quiz

Data Structures and Algorithm - Final Examinations Quiz

University

51 Qs

DSA - Infosys Power Programmer

DSA - Infosys Power Programmer

Assessment

Quiz

Computers

University

Medium

Created by

Mohd. Imran

Used 2+ times

FREE Resource

50 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the time complexity of computing prefix sum for an array of size n?
O(1)
O(n^2)
O(n)
O(log n)

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following is the prefix sum of array [2, 4, 6]?
[2, 6, 12]
[2, 4, 6]
[2, 8, 14]
[2, 6, 10]

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

How to get the sum of subarray [i..j] using prefix sum array?
prefix[j] - prefix[i]
prefix[j]-prefix[i+1]
prefix[j+1]-prefix[i]
prefix[j+1]-prefix[i+1]

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the prefix sum array of [1, -1, 3, 2]?
[1, 0, 3, 5]
[1, 1, 4, 6]
[1, -1, 2, 4]
[1, 0, 2, 3]

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which operation becomes efficient using prefix sums?
Sorting
Searching
Subarray sum
Rotating array

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

In prefix sum, what is prefix[0] typically initialized to?
0
1
First element
None of the above

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

If prefix sum array is [3, 7, 12, 20], what is the original array?
[3, 4, 5, 8]
[3, 7, 12, 20]
[3, 10, 5, 8]
[3, 7, 12, 32]

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?