DSA - Infosys Power Programmer

DSA - Infosys Power Programmer

University

50 Qs

quiz-placeholder

Similar activities

Technical Training Test for III BTech - VCE - CSE

Technical Training Test for III BTech - VCE - CSE

University

45 Qs

DS and DAA Mock Quiz

DS and DAA Mock Quiz

University

50 Qs

Struktur Data

Struktur Data

University

50 Qs

Data structure

Data structure

University

50 Qs

KLA Quiz Struktur Data UAS

KLA Quiz Struktur Data UAS

University

50 Qs

5. Software Defined Networking

5. Software Defined Networking

University

49 Qs

Design and Analysis of Algorithms [5th Sem BCA]

Design and Analysis of Algorithms [5th Sem BCA]

University

45 Qs

EC8393

EC8393

1st Grade - University

45 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?