
Coding Golf Event 2

Quiz
•
Other
•
University
•
Hard
Sunny Saxena
Used 1+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the time complexity of inserting an element at the beginning of an array in Python?
O(1)
O(log n)
O(n)
O(n log n)
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In Java, what happens when you try to access an index beyond the array size?
Compilation error
Returns null
Throws ArrayIndexOutOfBoundsException
Undefined behavior
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which data structure can be used to solve the maximum sliding window problem efficiently?
Stack
Queue
Set
Linked List
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Choose the correct output of this Python code: a = [1, 2, 3] print(a[-1])
1
2
3
Error
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In C++, which of the following declares a static array of size 10?
int arr[10];
int arr = new int[10];
vector
None
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following array problems is best solved using prefix sum?
Finding duplicates
Reversing the array
Range sum queries
Sorting
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which built-in function in Python returns the length of a list?
count()
len()
size()
length()
Create a free account and access millions of resources
Similar Resources on Wayground
12 questions
Brainy Bites: Python

Quiz
•
University
18 questions
Repaso Programacion I

Quiz
•
University
10 questions
PYTHON set4

Quiz
•
University
20 questions
Quiz on Array

Quiz
•
University
15 questions
Tech quiz Round 1

Quiz
•
University
20 questions
Season 5 #Spaic Python Weekly Quiz

Quiz
•
KG - Professional Dev...
10 questions
Arrays - 2D

Quiz
•
University
20 questions
Quanta

Quiz
•
University
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade