Applied algorithmic thinking

From Computer Science Wiki
This is a basic concept in computer science

Once you can define an algorithms you must analyze and deduce algorithms. Really, you need to trace what an algorithm does.

The algorithm below is well-named. Can you deduce what it might do?

def find_max (L):
    max = 0
    for x in L:
        if x > max:
            max = x
    return max

If you said something like "find the largest number in a list (or array) you are correct.

Do you understand this ?[edit]

Standards[edit]

These standards are used from the IB Computer Science Subject Guide[1]

  • Discuss an algorithm to solve a specific problem.
  • Analyse an algorithm presented as a flow chart.
  • Analyse an algorithm presented as pseudocode.
  • Construct pseudocode to represent an algorithm.
  • Suggest suitable algorithms to solve a specific problem.
  • Deduce the efficiency of an algorithm in the context of its use.
  • Determine the number of times a step in an algorithm will be performed for given input data

.

References[edit]

  1. IB Diploma Programme Computer science guide (first examinations 2014). Cardiff, Wales, United Kingdom: International Baccalaureate Organization. January 2012.