@elibelly
@elibelly
@elibelly
Looking at a problem and working out a way a computer might be able to help you solve it.
@elibelly
@elibelly
we want to, like, get information or do stuff to it soo how do we science that and then make computers do all the work real fast
@elibelly
@elibelly
An unambiguous set of steps to complete a task or computation
Â
It is very much like a recipe for a computer
@elibelly
Problem: Given a list of positive numbers, we need to return the largest number on the list.
Input: A list, "L", of positive numbers. This list must contain at least one number.Â
Output: A number, "n", which will be the largest number of the list.
@elibelly
@elibelly
The amount of time an algorithm takes to run in relation to the number of inputs
@elibelly
A mathematical notation that describes a measure of the execution of a function as the inputs approach infinityÂ
O( ? )
Example: O( 1 ) , O( n ), O( log n ) where n represents the number of inputsÂ
@elibelly
Download | Order Online | |
---|---|---|
@elibelly
Download | Order Online | |
---|---|---|
10 episodes | 10 hours | 16 hours |
@elibelly
Download | Order Online | |
---|---|---|
10 episodes | 10 hours | 16 hours |
50 episodes | 50 hours | 16 hours |
@elibelly
Download | Order Online | |
---|---|---|
10 episodes | 10 hours | 16 hours |
50 episodes | 50 hours | 16 hours |
n episodes | n hours | 16 hours |
Time complexity | O( n ) | O( 1 ) |
Conclusion: Ordering Online is a more scalable algorithm!
@elibelly
[ 34, 7, 0, 4, 12, 11, 104, 3, 19 ]
@elibelly
A data structure is a particular way of organizing data in a computer so that it can be used efficiently
@elibelly
pop()
push(book)
enqueue(person) //add
dequeue()
//remove
đź‘€peek()
🤔isEmpty()
đź‘€peek()
🤔isEmpty()
Last In, First Out ordering
First In, First Out ordering
@elibelly
Node-based data structures. A tree is a type of graph.
@elibelly
@elibelly
@elibelly
Problem: Given a list of positive numbers, we need to return the largest number on the list.
Input: A list, "L", of positive numbers. This list must contain at least one number.Â
Output: A number, "n", which will be the largest number of the list.
@elibelly
[ 3, 5, 20, 11, 8 ]
[ 8, 3, 11, 5, 20 ]
3
20
11
8
5
Time Complexity O(n)
Time Complexity O(log n)
[ 20, 11, 8, 5, 3 ]
Time Complexity O(1)
20
11
8
5
Time Complexity O(n)
@elibelly
@elibelly
@elibelly