Back to marketplace

2022 p1

No description yet. This curated deck is ready for daily study.

Total cards: 6•Content version: v4•Public deck•Updated: 8/1/2026

Card preview (6)

#1
Front (Question)

Big-O time complexity for Bubble sort

Back (Answer)

O(n^2)

#2
Front (Question)

Big-O time complexity for Linear search

Back (Answer)

O(n)

#3
Front (Question)

Big-O time complexity for Merge sort

Back (Answer)

O(nlogn)

#4
Front (Question)

Describe the method that would need to be followed to attempt to remove an item from a circular queue implemented as a static data structure using an array

Back (Answer)

• check if the queue is empty by comparing the front and rear pointer. if equal, the queue is empty and no item can be removed. • if not empty, remove the front item from the front of the queue. • update the front pointer to the next item in the queue. if the front pointer exceeds the size of the array, reset it to 0. • reduce the count of items in the queue by 1

#5
Front (Question)

three differences between dynamic and static data structures

Back (Answer)

static data structures memory are allocated at compile time/dynamic data structure memory are allocated at run time. static data structure size is fixed and cannot change during runtime/ dynamic data structure size can be changed during runtime static data structure memory is managed by compiler/ dynamic data structure memory is managed by the programmer

#6
Front (Question)

explain how a single stack can be used to reverse the order of the items in a queue

Back (Answer)

• deque all the items from the queue and push them onto the stack • pop them off one by one and enqueue them back into the original queue • the order of the items in the queue will be reversed