This sorting algorithm compares the current value of the array with the next value, and swaps the values if the current is greater than the next value, creating a "bubbling" effect.
What is bubble sort
An algorithm that processes each element of an input list exactly once has this time complexity.
What is O(n)?
Each node in a linked list contains at least what two components?
data (or value) and a pointer (or link)
What is the size of this tree? (Tree1.jpg)
Size is n = 7
This algorithm allows you to quickly search through a sorted array by checking the center of an array, and either checking the left half of the array if the target value is lower or searching the right half of an array if the target value is higher than the center
What is Binary Search
This stable, comparison-based sorting algorithm builds the final sorted list one element at a time by shifting larger elements to make room, and it operates in O(n²) time in the worst case.
What is insertion sort?
What is the time complexity for this nested loop? (example 1)
What is O(n2)?
This type of linked list allows traversal in both forward and backward directions because each node contains two pointers—one to the next node and one to the previous.
What is a doubly linked list?
True or False, the following tree is a Binary Search Tree (Tree2.png)
True
This data structure stores key-value pairs and uses a hash function to compute an index where each value is stored.
What is a hash-map?
This sorting algorithms uses recursion to split an array into two sub-arrays until each sub-arrays only has1 value, then build back the array by combining the sub-arrays back in a sorted order
What is merge sort
This Big O complexity describes an algorithm whose running time doubles with each additional input element, often seen in brute-force solutions to subsets or combinatorial problems.
What is O(2n)?
In this type of linked list, the final node does not point to null but instead links back to the first node, creating a loop.
What is a circular linked list?
This type of binary tree maintains a height difference of at most one between the left and right subtrees of every node, ensuring O(log n) search, insert, and delete operations.
What is an AVL tree?
This data structure follows LIFO (Last in First Out) Principle
Stack
Unlike comparison-based sorting algorithms, this algorithm sorts numbers by processing individual digits from least significant to most significant (or vice versa), achieving linear time under certain conditions.
What is Radix sort?
What is the average-case time complexity of both Quick Sort and Merge Sort
In a singly linked list, this operation requires O(n) time because you must traverse the list to find the element just before the one you want to remove.
Do the Pre-Order traversal of this tree (Tree3.png)
R,A,C,D,B,E,F,G
This graph traversal algorithm explores all neighbors of a node before moving on to the next level, typically using a queue to track the frontier.
What is BFS (Breadth-First Search)?
Evaluate the code and identify which sorting algorithm it is. (Sorting3.cpp, Sorting3.py)
What is Quick sort
Give me the best, average and worst time complexities of the following sorting algorithms: Quick Sort and Bubble Sort
Bubble : O(n), O(n2), O(n2)
Quick: O(n log(n)), O(n(log(n)), O(n2)
What is the following linked list called? (List4.png)
What is a circular doubly Linked list?
To find the Minimum spanning tree of an undirected graph, you can use either of these 2 algorithms (name one)
What is prim's algorithm or what is kruskal's algorithm?
This algorithm finds the shortest path from a starting node to all other nodes in a weighted graph, as long as the edge weights are non-negative.
What is Djikstra's algorithm?