Posts

Showing posts from January, 2026

CST 370: Learning Journal Week 3

This week we covered  brute force and exhaustive search ,  depth-first search (DFS) ,  breadth-first search (BFS) , and an  introduction to divide-and-conquer algorithms .  B rute force string matching and exhaustive search , which emphasize solving problems by checking all possible solutions. Brute force string matching works by aligning a pattern with a text and comparing characters one by one until a match is found or all possibilities are exhausted. It is often inefficient for large inputs. The key concept was that  brute force guarantees correctness but does not scale well , making it impractical for complex or large datasets. Depth-First Search (DFS) , an algorithm used primarily for traversing graphs and trees. DFS works by exploring as far as possible along one path before backtracking. This method is useful for tasks like path discovery, cycle detection, and connectivity analysis. One important takeaway was that DFS uses a stack-based approach, whi...

CST 370 - Week 2 Journal

Asymptotic Notations: Provides a formal way to describe how an algorithm's running time grows as the input size increases. Instead of focusing on exact execution times, which depend on hardware and implementation details, these notations allow us to compare algorithms based on their growth rates. Big-O notation describes an upper bound, helping understand the worst-case scenario. Big-Omega gives lower bound and Big Theta captures a tight bound, showing when upper and lower bounds match.  Analysis of Non-Recursive Algorithms: Focuses on determining running time by counting how often a key operation executes. This usually involves analyzing loops and converting them into summation expressions. Nested loops are especially important since they often lead to polynomial time complexities. Basic operation - dominates running time and expressing its frequency as a function of input size.  Analysis of Recursive Algorithms: Require different analysis approach using recurrence relations....

CST 370 - Week 1 Journal

Introduction to Algorithms      - Core Concepts:           - An algorithm is a precise sequence of steps for solving a problem or performing a computation.           - Algorithms helps us solve problems efficiently           - Key properties of algorithms:                - well-defined inputs and outputs               - finite and ambiguous  steps               -effectiveness and termination     - Analysis framework         - not all correct algorithms are efficient. Analysis gives us a way to measure efficiency          - Key tools:                - time complexity                    - Big-O n...