0% found this document useful (0 votes)
46 views1 page

Computer Science Notes

The document provides an introduction to algorithms, defining them as step-by-step procedures for problem-solving. It outlines characteristics of good algorithms, such as clarity, input/output requirements, finiteness, and efficiency. Additionally, it includes examples of algorithms for finding the largest number in a list and lists common types of algorithms like searching, sorting, and pathfinding.

Uploaded by

kqwqnyzftz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views1 page

Computer Science Notes

The document provides an introduction to algorithms, defining them as step-by-step procedures for problem-solving. It outlines characteristics of good algorithms, such as clarity, input/output requirements, finiteness, and efficiency. Additionally, it includes examples of algorithms for finding the largest number in a list and lists common types of algorithms like searching, sorting, and pathfinding.

Uploaded by

kqwqnyzftz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Computer Science Study Notes

Computer Science – Introduction to Algorithms

An algorithm is a step-by-step procedure to solve a problem.

Characteristics of a good algorithm: 1. Clear and unambiguous steps. 2. Input: data required to solve
the problem. 3. Output: the result after execution. 4. Finiteness: must terminate after a finite number of
steps. 5. Efficiency: uses minimal time and resources.

Example: Algorithm to find the largest number in a list. 1. Set the first number as the largest. 2.
Compare with the next number. 3. If larger, update the largest number. 4. Repeat until all numbers are
checked. 5. Output the largest number.

Common types of algorithms: • Searching (linear search, binary search) • Sorting (bubble sort,
quicksort) • Pathfinding (Dijkstra’s algorithm)

You might also like