DSA

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

What is the resulting stack when the push(1) function is implemented on this stack yield?8,9,3,5(top is 8)

1, 8, 9, 3, 5

What is the result when 6 is enqueued to the queue 7,9,8 (with 7 as the front)?

7, 9, 8, 6

Which value would be returned from executing the dequeue operation on the queue 7,9,8 (with 7 as the front)?

8

Which queue results from executing the following queue operations on the queue 7,9,8 (with 7 as the front)? Dequeue ()Enqueue (6)Enqueue (5)Dequeue ()

8, 6, 5

dequeue from 7, 9, 8

9, 8

Big O of Bubble sort

Best: O(n) Average & Worst: O(n^2)

Push(queue, x)

Inserts x at end of the queue

Exponential Run Time

N^2

Radix Sort Big O

O(N)

Shell Sort Big-O

O(N^3/2)

Binary Search Big O

O(log n)

Big O of linear search

O(n)

Selection Sort time complexity

O(n^2)

Big O of Merge Sort

O(nlogn)

Quicksort time complexity

O(nlogn)

Pop(queue)

Returns and removes item at front of queue

Peek(queue)

Returns but does not remove item at the front of the queue

Record

a collection of related data elements

Hash Table

a table that associates key values with data by use of a hash function.

Best data structure for a hash table with chaining

doubly linked list

Post-Order Traversal

left, right, root

inorder traversal

left, root, right

How many elements in a list of size N would be visited when using a binary search for a number that is larger than all the values in the list

log2(N) ex: log2(64) = 6

How many elements in a list of size N would be visited when using a binary search for a number that is smaller than all the values in the list

log2(N) ex: log2(64) = 6

Pre-Order Traversal

root, left, right


संबंधित स्टडी सेट्स

Iggy Chapter 61: Assessment of the Endocrine System

View Set

Chapter 5: Neurodevelopmental Disorders

View Set

MGT 3020 Chapter 1 What is organizational Behavior?

View Set

Module 6 Acute Lymphocytic Leukemia

View Set

Chapter 45 all: Disorders of the Female Reproductive System

View Set

Evaluating Function Notation -- GRAPHS

View Set