Unit 3 Sections 9 and 11 Notes
This is a blog post about the lesson on Unit 3 Sections 9 and 11
Notes
- Algorithms can be written in different ways and still accomplish the same tasks.
- Algorithms that look similar often yield differnet outputs.
- Many different algorithms can be use to solve the same problem
- Algorithms are very important for programmers
- Conditionals and booleans can be equivalent.
- If and for loops will be used for selection and iteration
- A subnet mask is a 32 bit number that identifies what network an IP address is in through a process that uses the bitwise AND
- An IP address is a 32 bit number that uniquely identifies each device.
- Searching is finding and retrieving a data value and/or index
- Searching algorithms could be done in either intervals or sequences, and certain algorithms could be more efficient than others, with benefits and drawbacks to each.
- The most obvious solution to the searching problem is to sequentialy check each successful value in the data structure until either a matching value is found, or the entire structure has been transversed.
- Using some sort of loop, generally for or while loop
- Sequential search, however, is not efficient when testing large data inputs
- Because sequential search checks every value of the given array, the algorithm’s overall runtime increases “linearly” with the input size.
- Binary search is an efficient way to iterate through a SORTED list to find a requested value.