Package topics.introduction


package topics.introduction
Introduction to algorithms, computational thinking, and fundamental data structures.

This package is the starting point for learners new to algorithm design. It covers two complementary areas:

  • Algorithm introduction — what an algorithm is, how to measure its correctness and efficiency, and how to improve naive solutions step by step.
  • Principles & data structures — the foundational building blocks (recursion, search, core data structures) required before studying advanced topics.

Algorithm Introduction

  • Correctness — does the algorithm always produce the right answer?
  • Efficiency — how does running time grow with input size (Big-O)?
  • Stress testing — comparing a naive solution against an optimised one on random inputs to detect bugs.

Principles & Fundamentals

  • Recursion — base cases, inductive reasoning, call-stack mechanics.
  • Search algorithms — sequential search, sentinel search, binary search.
  • Core data structures — arrays, linked lists, stacks, queues, sets, priority queues (see topics.introduction.examples).

Classes in This Package

  • Classes
    Class
    Description
    To calculate the factorial of a number
    To get the addition of a list of numbers
    To get the maximum of a list of numbers
    Just to show a small example of how the project is structured
    Computes the max pairwise product among different numbers E.g.: 7 3 6 => 42 However, in this example we will only work with two integer numbers
    Computes the max pairwise product among different numbers E.g.: 7 3 6 => 42 However, in this example we will only work with two long numbers
    Computes the max pairwise product among different numbers E.g.: 7 3 6 => 42 We will load the numbers from MaxPairWiseProductRandomNumbers.txt
    Computes the max pairwise product among different numbers E.g.: 7 3 6 => 42 We will load the numbers from MaxPairWiseProductRandomNumbers.txt
    Computes the max pairwise product among different numbers E.g.: 7 3 6 => 42 We will load the numbers from MaxPairWiseProductRandomNumbers.txt
    Computes the max pairwise product among different numbers E.g.: 7 3 6 => 42 We will load the numbers from MaxPairWiseProductRandomNumbers.txt
    Generates a test data file of random integers for the MaxPairWiseProduct problem.
    To use different methods for searching numbers in an array