Please enable JavaScript.
Coggle requires JavaScript to display documents.
AH Standards algorithms - Coggle Diagram
AH Standards algorithms
insertion sort
inner loop loops through from pointer down to zero
outer loop gets bigger as the pointer increases
pivot value / point starts on small at the far left
it can stop when the value is the right place
searching through the sorted pile (efficient)
starts sort from the left and gets bigger moving to the right
swaps x and x-1
bubble sort
is sorts to the top
and as a consequence the bottom
uses swaps x and x+1
the pointer / pivot value slowly shrinks down
outer loop starts high and shrinks
inner loop starts at the bottom and bubbles up
search through the unsorted pile (inefficient)
selection sort (less likely)
binary search
alternatively do a recursive binary search
if its not the mid then middle goes
higher +1 or lower -1 depending if higher or lower
prerequisites
must be sorted
no duplicates
one consistent data type
compare the mid to target
if its the same:
stop
move the midpoint
repeat
linked lists
connect to DB
select a database
give it the connection
give it a DB name
mysqli_select_db()
needs username and password for DB user
needs "host" - ip address, domain, or localhost
"or die" error message if it cant get a connection
mysqli_connect()
DB query
mysqli_query()
mysqli_num_rows
field names
know the data types
pass in the con
well formed query
"or die" error message
check if any row are returned
while loop to go through the data returned
catch the array data and assign to variables
creating a class
inheritance
encapsulation
polymorphism