Computer Science Algorithms
- Created by: moahmed0987
- Created on: 11-10-18 21:05
View mindmap
- Algorithms
- Main Features
- Should be precise, well-defined and finite.
- A computer programs are implementation of an algorithm
- An algorithm is a sequence of instructions that perform a specific task when followed
- Algorithms are abstract and independent of any system.
- Methods of Representation
- Pseudocode
- Informal description
- Intended for human reading but resembles code,
- NO standardised syntax
- Flowcharts
- Has Start and End in an elipse
- Has Processes being carried out in Rectangles
- Has decisions being made inside diamonds or rhombus'.
- Pseudocode
- Examples of algorithms
- Linear algorithm
- Works by checking each element to see if it matches the target
- Repeats until match is found or the whole list has been checked
- (for i in range(len(list)): if i == target: return target)
- Binary Algorithm
- Continually divides list by two, eliminating the part of the list that cannot have your item in it
- The list must be fully ordered first to eliminate without any certainty
- Works by simplification, unlike linear search which works bu brute force.
- Linear algorithm
- Main Features
Comments
No comments have yet been made