What is the time complexity of inserting an element into a stack implemented using an array?
DSA Quiz 4th Semster CE

Quiz
•
Other
•
University
•
Hard
Gp BrighUp
Used 9+ times
FREE Resource
40 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
O(1)
O(n)
O(log n)
O(n^2)
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which data structure is used for breadth-first traversal of a graph?
Stack
Queue
Array
Linked List
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the worst-case time complexity of the quicksort algorithm?
. O(n)
O(n log n)
O(n^2)
O(log n)
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In a binary search tree, which traversal gives the nodes in ascending order?
Preorder
Inorder
Postorder
Level order
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of hashing in data structures?
Sorting elements
Searching elements
Inserting elements
Deletion of elements
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which sorting algorithm has the best average-case time complexity?
Bubble Sort
Merge Sort
Insertion Sort
Selection Sort
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which data structure uses LIFO (Last In, First Out) ordering?
Queue
Stack
Linked List
Tree
Create a free account and access millions of resources
Similar Resources on Quizizz
42 questions
IMMUNODEFICIENCIES / IMMUNOLOGIC DISORDERS

Quiz
•
University
35 questions
tthcm 6

Quiz
•
University
40 questions
40 CONCENTRACION SIMULACRO 3.1

Quiz
•
University - Professi...
40 questions
Time Complexity Quiz

Quiz
•
University
40 questions
Design Thinking

Quiz
•
University
40 questions
алгоритм 3

Quiz
•
University
40 questions
Trabalho Gerenciamento de Riscos e Segurança no trabalho.

Quiz
•
University
45 questions
CS 213 - Long Quiz

Quiz
•
University
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade