Algorithms
17 articlesComplexity
3- Algorithm Complexity★★★
Algorithm complexity measures how the running time or memory usage of an algorithm grows as the size of its input increases. Big-O notation is the standard way to express this.
- Space Complexity★★★
Space complexity describes how much memory an algorithm needs relative to its input size. Alongside time complexity, it helps you evaluate whether an algorithm is practical for a given situation.
- Time Complexity★★★
Time complexity describes how the running time of an algorithm grows as the input size increases. Using Big O notation, you can compare algorithms and predict which will perform better on large datasets.
Flowcharts
3- Drawing Flowcharts★★
Drawing a flowchart means turning an algorithm into a clear visual diagram using the correct symbols, decision paths, and loop structures. A well-drawn flowchart communicates logic better than code alone.
- Flowchart Symbols★
Flowchart symbols are standardised shapes used to represent different types of steps in an algorithm. Learning the standard symbols lets you read and draw flowcharts clearly and consistently.
- Flowcharts★
A flowchart is a visual diagram that uses standard shapes and arrows to represent the steps and decisions in an algorithm or process.
Overview
1Pseudocode
3- Pseudocode Structures★★
Pseudocode structures — sequence, selection, and iteration — are the three building blocks used to express any algorithm. Mastering them lets you plan solutions to complex problems clearly.
- Pseudocode★
Pseudocode is an informal, plain-English way of describing an algorithm's steps without worrying about the exact rules of any programming language.
- Writing Pseudocode★
Pseudocode is an informal way of describing an algorithm using plain language and programming-like structure. It lets you plan your logic before worrying about the syntax of a real programming language.
Searching
3- Binary Search★★
Binary search finds a target value in a sorted list by repeatedly halving the search space. It is dramatically faster than linear search for large datasets.
- Linear Search★
Linear search checks each item in a list one by one until it finds the target or reaches the end. It is the simplest search algorithm and works on any list, sorted or unsorted.
- Searching Algorithms★★
Searching algorithms find a specific item within a collection of data. The two most fundamental approaches are linear search and binary search.
Sorting
4- Bubble Sort★★
Bubble sort is a simple sorting algorithm that repeatedly swaps adjacent items that are in the wrong order. It is a great first algorithm to study because its logic is easy to follow step by step.
- Insertion Sort★★★
Insertion sort builds a sorted list one item at a time by inserting each new item into its correct position among the already-sorted items. It works especially well on small or nearly-sorted lists.
- Selection Sort★★
Selection sort finds the smallest item in the unsorted portion of a list and moves it into place, one item at a time. It is easy to understand and always makes the same number of comparisons.
- Sorting Algorithms★★
Sorting algorithms arrange a list of items into a defined order. Understanding how they work helps you choose the right one for a given task.