Search Header Logo

Data Structures & Algorithms

Authored by Trang Phan

Computers

7th Grade

Used 1+ times

Data Structures & Algorithms
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

40 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the time complexity of inserting an element at the end of an array (without resizing)?

O(1)

O(n)

O(log n)

O(n log n)

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which data structure is most suitable for performing undo operations?

Queue

Stack

Hash table

Array

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a main advantage of using a hash table compared to an array for searching elements?

Constant time access using a key

Elements are sorted

Uses less memory

No collisions

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Among the following traversal orders, which order is correct for in-order traversal of a binary search tree?

Root -> Left -> Right

Left -> Root -> Right

Right -> Root -> Left

Root -> Right -> Left

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the main difference between a stack and a queue?

Stack uses FIFO, Queue uses LIFO

Stack uses LIFO, Queue uses FIFO

Stack only stores numbers, Queue stores strings

Stack is dynamic, Queue is static

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In a min-heap, which of the following is always true?

The root has the largest value

All leaves have the same value

The root has the smallest value

All nodes are sorted in ascending order

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which sorting algorithm has the best average time complexity among the following algorithms?

Selection sort

Bubble sort

Quick sort

Insertion sort

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?