Back to marketplace

Fundamentals of algorithms

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

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

Card preview (16)

#1
Front (Question)

describe breadth-first

Back (Answer)

shortest path for an unweighted graph

#2
Front (Question)

describe depth-first

Back (Answer)

Navigating a maze

#3
Front (Question)

describe pre order

Back (Answer)

copies a tree

#4
Front (Question)

describe in order

Back (Answer)

outputs the contents of a binary search tree in ascending order

#5
Front (Question)

describe post order

Back (Answer)

emptying a tree

#6
Front (Question)

why RPN is used

Back (Answer)

Easier for computer to analyse Do need brackets so don’t have to keep track of parentheses

#7
Front (Question)

where RPN is used

Back (Answer)

Used in interpreters based on a stack for example Postscript and bytecode.

#8
Front (Question)

binary search

Back (Answer)

continually divides a list by two, eliminating the part of the list that cannot have your item in it O(log n)

#9
Front (Question)

linear search

Back (Answer)

checks each element to see if it matches the target O(n)

#10
Front (Question)

bubble sort

Back (Answer)

swaps the largest with the smallest until list is in order O(n^2) {example of a particularly inefficient sorting algorithm, time-wise.}

#11
Front (Question)

merge sort

Back (Answer)

splits the input into two lists of similar sizes, sorts them recursively and merges them back together into one sorted lists O(nlog n)

#12
Front (Question)

applications of shortest path algorithm.

Back (Answer)

navigation system to find most efficient routes between locations

#13
Front (Question)

recursion vs iteration

Back (Answer)

iterative solutions often start small and build up recursion solutions often start big and break the problem down

#14
Front (Question)

pros and cons of iteration and recursion

Back (Answer)

iterative solutions often start small and build up recursion solutions often start big and break the problem down pros: recursive solutions can be more concise and readable iterative solutions often execute faster cons: recursion can run infinitely when the the general case doesn’t move towards the stopping case / can take up more memory iteration can run infinitely if an indefinite loop is used and the condition never changes

#15
Front (Question)

recursion

Back (Answer)

Subroutine that calls itself

#16
Front (Question)

call stack

Back (Answer)

keeps track of subroutines that have started but havent finished