Data Structures and Algorithm

Quiz
•
Computers
•
University
•
Easy

Gajendra Acharya
Used 3+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 10 pts
What is a data structure?
A programming language
A collection of algorithms
A way to store and organize data
A type of computer hardware
Answer explanation
A data structure is specifically defined as a way to store and organize data efficiently, making it easier to access and manipulate. The other options do not accurately describe what a data structure is.
2.
MULTIPLE CHOICE QUESTION
20 sec • 10 pts
Which data structure is used for implementing recursion?
Fibonacci
Function Calls
Stack
Queue
Answer explanation
Recursion relies on the stack data structure to keep track of function calls. Each recursive call is pushed onto the stack, and when a base case is reached, the calls are popped off, allowing the program to return to previous states.
3.
MULTIPLE CHOICE QUESTION
20 sec • 10 pts
The data structure required for Breadth First Traversal on a graph is?
Array
Stack
Tree
Queue
Answer explanation
Breadth First Traversal uses a Queue to explore nodes level by level. Nodes are enqueued as they are discovered and dequeued for processing, ensuring that all nodes at the current level are processed before moving to the next.
4.
MULTIPLE CHOICE QUESTION
20 sec • 10 pts
What is an AVL tree?
a tree which is unbalanced and is a height balanced tree
a tree which is balanced and is a height balanced tree
a tree with atmost 3 children
a tree with three children
Answer explanation
An AVL tree is a type of binary search tree that maintains balance by ensuring the heights of the two child subtrees of any node differ by no more than one. This makes it a height-balanced tree, confirming the correct choice.
5.
MULTIPLE CHOICE QUESTION
20 sec • 10 pts
what is a dequeue?
a queue implemented with both singly and doubly linked lists
a queue with insert/delete defined for front side of the queue
a queue with insert/delete defined for both front and rear end of the queue
a queue implemented with a doubly linked list
Answer explanation
A dequeue, or double-ended queue, allows insertion and deletion of elements from both the front and rear ends, making it more versatile than a standard queue, which only allows these operations at one end.
6.
MULTIPLE CHOICE QUESTION
20 sec • 10 pts
What is the time complexity of Bubble Sort in the average case?
o(n2)
o(n log n)
o(n3)
o(n)
Answer explanation
The average case time complexity of Bubble Sort is O(n²) because it involves nested loops, where each element is compared with every other element, leading to quadratic growth in the number of comparisons as the input size increases.
7.
MULTIPLE CHOICE QUESTION
20 sec • 10 pts
algorithm to find the shortest path from a source node to all other nodes in a graph with non-negative weights?
Breadth-First Search (BFS)
Depth-First Search (DFS)
Bellman-Ford Algorithm
Dijkstra's Algorithm
Answer explanation
Dijkstra's Algorithm is specifically designed to find the shortest path in graphs with non-negative weights, making it the correct choice. BFS and DFS do not account for weights, while Bellman-Ford handles negative weights.
Create a free account and access millions of resources
Similar Resources on Wayground
16 questions
Algoritma dan Struktur Data

Quiz
•
10th Grade - University
20 questions
Quiz 3 DAA

Quiz
•
University
20 questions
Techies's Question Set for Club Day

Quiz
•
University
15 questions
07 - Map

Quiz
•
University
25 questions
Kuis PD M11

Quiz
•
University
20 questions
New DSC Quiz

Quiz
•
University
20 questions
Data Structure

Quiz
•
University
15 questions
Seatwork (SEQUENTIAL CONTAINER TYPES) data structure

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms

Quiz
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
15 questions
Properties of Equality

Quiz
•
8th Grade - University
38 questions
WH - Unit 3 Exam Review*

Quiz
•
10th Grade - University
21 questions
Advise vs. Advice

Quiz
•
6th Grade - University
12 questions
Reading a ruler!

Quiz
•
9th Grade - University