Data Structures and Algorithms Quiz
Quiz
•
Computers
•
University
•
Practice Problem
•
Medium
Social Media
Used 9+ times
FREE Resource
Enhance your content in a minute
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 sec • 5 pts
What is the time complexity of accessing an element in an array by index?
O(1)
O(n)
O(log n)
O(n²)
2.
MULTIPLE CHOICE QUESTION
45 sec • 5 pts
Which of the following is true about arrays in C/C++?
Arrays can dynamically grow
Indexing starts from 1
Array size must be known at compile time
Arrays are always initialized automatically
3.
MULTIPLE CHOICE QUESTION
45 sec • 5 pts
What will arr[5] return if arr has only 5 elements?
The 5th element
The 6th element
Compilation error
Runtime error only in C++
4.
MULTIPLE CHOICE QUESTION
45 sec • 5 pts
Which data structure is best for implementing multiple stacks in a single array?
Queue
Linked List
Two pointer method
Binary Tree
5.
MULTIPLE CHOICE QUESTION
45 sec • 5 pts
What’s the default garbage value in uninitialized array elements (in C++)?
0
-1
Random/Undefined
NULL
6.
MULTIPLE CHOICE QUESTION
45 sec • 5 pts
Which is true about singly linked lists?
Nodes have pointers to both previous and next
Searching is O(1)
Insertion at head is O(1)
Memory is contiguous
7.
MULTIPLE CHOICE QUESTION
45 sec • 5 pts
What is stored in the last node of a singly linked list?
Pointer to head
NULL
Next element
Garbage
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
17 questions
revision 1
Quiz
•
University
20 questions
Sjmit-Q2-[Workshop-MAR-25]
Quiz
•
12th Grade - University
18 questions
Tin 8 - Câu lệnh điều kiện lệnh
Quiz
•
University
15 questions
Pra UAS Algoritma dan Pemrograman Lanjut
Quiz
•
University
20 questions
Ch.8 - Introducing Python
Quiz
•
6th Grade - Professio...
15 questions
NSCC-CODE TO COIN
Quiz
•
University
20 questions
UAS Struktur Data 2022
Quiz
•
University
15 questions
Revisão - Unidade I - Teoria da Computação
Quiz
•
University
Popular Resources on Wayground
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
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
