Computer Science

  • Trees

    Computer science trees have a lot in common with those outside your window! Below is an example of a small tree.

  • Brute Force and Backtracking

    1. Brute Force

    For many problems, brute force is a valid and effective strategy for solving a problem. Many problems cannot be implemented with a "clever" algorithm, or are very difficult to code otherwise. As well, brute force is a viable method if you cannot think of a different algorithm! With the speed of modern computers, one can complete millions of operations per second. However, it is very important to consider the time required for a brute force algorithm, as many have exponential time complexity.

  • Dynamic programming

    Dynamic Programming (DP) can be considered as a specific method to optimize brute force. While DP is only applicable to certain problems, it is an extremely powerful tool capable of reducing exponential time complexities into polynomial or even linear complexities! As such, it is recommended that you understand brute force algorithms first.

    Consider the following figure:

  • Graphs

    Graphs are one of the most useful structures in computer science.

    A graph is a collection of nodes, also called vertices. These are connected by edges, represented by arrows in the above diagram. There are many types of graphs: