Back to marketplace

fundamentals of algorithms

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

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

Card preview (24)

#1
Front (Question)

what are the two types of ways to traverse a graph

Back (Answer)

depth first breadth first

#2
Front (Question)

what is a graph

Back (Answer)

an abstract data type used to represent complex non linear relationships between objects using unordered set of nodes connected by edges -

#3
Front (Question)

describe depth first traversal

Back (Answer)

starts at root and follows one branch as far as it can go -used to navigate mazes

#4
Front (Question)

describe breadth first traversal

Back (Answer)

start at the root node and scan every connect node from left to right -finds the shortest path of an unweighted graph

#5
Front (Question)

what are the steps of depth first traversal

Back (Answer)

Visit the root node and push it onto the stack. Traverse on of the sub tree Visit each unvisited node in the sub tree and push them onto the stack When you get to a node with no other connections pop it of the stack If needed continue popping of nodes until you get to one connected to unvisited nodes When all the nodes are visited the visited array will show the order of traversal

#6
Front (Question)

what are the steps of breadth first traversal

Back (Answer)

Visit root node queue connected nodes Visited= [A] Queue=[B, D, E] From right to left visit connected nodes Dequeue each node as you visit its connected nodes Enqueue connected nodes Visited= [A,B] Queue=[D, E,C] Visited= [A,B,D] Queue=[E,C ,F]

#7
Front (Question)

what abstract data type is used for depth traversal

Back (Answer)

a stack

#8
Front (Question)

what abstract data type is used for breadth traversal

Back (Answer)

a queue

#9
Front (Question)

what are searching algorithms for

Back (Answer)

they are used to search for specific items in a data set

#10
Front (Question)

what are 3 types of searching algorithms

Back (Answer)

linear search algorithm binary search algorithm binary tree search algorithm

#11
Front (Question)

what is the time complexity of the linear search algorithm

Back (Answer)

O(n)

#12
Front (Question)

what is the time complexity of binary search algorithm

Back (Answer)

O(logn)

#13
Front (Question)

what is the time complexity of the binary tree search algorithm

Back (Answer)

O(logn)

#14
Front (Question)

how does the linear search algorithm work

Back (Answer)

-Linear search works by inspecting every item in a list one by one until the desired item (the target) is found. -If the target does not exist in the list, the algorithm will check every single item in the list before finishing

#15
Front (Question)

how does the binary search algorithm work

Back (Answer)

-The first step is to take the middle piece of data -To find the midpoint of the data, add the highest position and the lowest position of the array being considered, and divide by 2.

#16
Front (Question)

what search algorithm is used for ordered lists

Back (Answer)

binary search algorithms

#17
Front (Question)

what search algorithm is used for unordered lists

Back (Answer)

linear search algorithms

#18
Front (Question)

how does the binary tree search algorithm work

Back (Answer)

they function the same as binary search algorithms but are just applied to trees

#19
Front (Question)

what are sorting algorithms for

Back (Answer)

they are used to sort elements of an array into a specific order.

#20
Front (Question)

what are the two types of sorting algorithms

Back (Answer)

bubble sort merge sort

#21
Front (Question)

what is the time complexity of the merge sort

Back (Answer)

O( n log n )

#22
Front (Question)

what is the time complexity of the bubble sort

Back (Answer)

O(n^2)

#23
Front (Question)

how does the bubble sort work

Back (Answer)

bubble sorts makes passes through the data and swaps adjacent items until no swaps can be performed

#24
Front (Question)

how does the merge sort work

Back (Answer)

merge sorts split arrays into smaller lists and reform them using the divide and conquer method