1/7
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
linear search
an algorithm that traverses through every item
one at a time
until it finds the item its searching for

binary search
algorithm which uses a divide and conquer algorithm
splits the list in half

bubble sort
passes through the list evaluating
pairs of item
stacks
LIFO structure
implemented as an array
use a single pointer, points to the element currently at the top
top pointer initialised at -1 (first element would be 0)
different algorithms for stacks?

size()
returns the number of elements
in the stack
(returns the value of top pointer +1)

isEmpty()
(checks if stack is empty)
checks if top pointer is less than 0 = empty stack

peek()