# derko510/cse-101 architecture

> Architecture diagram of the GitHub repository derko510/cse-101, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-03-31). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/derko510/cse-101
- Repository: https://github.com/derko510/cse-101

## Overview

##### Main Components
- Inside it, represent each assignment as a separate component: pa1, pa2, pa3, pa4, pa5, pa6, pa7, pa8.
– pa1: Lexical analysis (Lex.c) + list operations.
– pa2: Graph path finding and related list and graph utilities.
– pa3: Graph connectivity (finding components) and graph testing.
– pa4: Matrix operations (Matrix, Sparse), plus list operations.
– pa5: List manipulation (with advanced C++ usage) and shuffle functionality.
– pa6: Big integer arithmetic (Arithmetic.cpp, BigInteger.cpp) with list operations.
– pa7: Dictionary operations and ordering.
– pa8: Dictionary and word frequency analysis.

##### Interactions and Dependencies
- Within each PA component, outline the internal modules:
– Main application logic files (e.g., Lex.c, FindPath.c, FindComponents.c, etc.)
– Supporting data structures (e.g., List, Graph, Matrix, Dictionary, BigInteger).
– Test modules that validate each core component (e.g., ListTest.c, GraphTest.c, BigIntegerTest.cpp).
– The Makefile acts as a build orchestrator.

##### Architectural Patterns and Design Principles

- The main algorithm/module (e.g., Lex.c in pa1, FindPath.c in pa2, etc.).
- Supporting modules (e.g., List components, Graph modules, etc.).
- Test modules connected to their respective core components.
- The Makefile as a “build” component interacting with all code files.
- Data flow from the “main” file to the supporting modules.
- Interaction between tests and corresponding modules.
- The orchestration provided by the build process (Makefile) that compiles the system.
- Core functionality modules (rectangles)
- pa2 and pa3 both depend on a Graph abstraction.
- pa7 and pa8 both involve Dictionary functionality, with pa8 further processing word frequency analysis.

## Diagram (Mermaid)

```mermaid
flowchart TD
    course["CSE-101 DSA Projects"]:::header

    course --> pa1_make
    course --> pa2_make
    course --> pa3_make
    course --> pa4_make
    course --> pa5_make
    course --> pa6_make
    course --> pa7_make
    course --> pa8_make

    subgraph "PA1 - Lexical Analysis and List Operations (C)"
        pa1_lex["Lex.c"]:::core
        pa1_listC["List.c"]:::core
        pa1_listH["List.h"]:::core
        pa1_test["ListTest.c"]:::test
        pa1_make["Build (Makefile)"]:::build
        pa1_docs["Docs (README.md)"]:::doc
        pa1_lex --> pa1_listC
        pa1_test --> pa1_listC
        pa1_make --> pa1_lex
        pa1_make --> pa1_listC
    end

    subgraph "PA2 - Graph Path Finding and List/Graph Utilities (C)"
        pa2_find["FindPath.c"]:::core
        pa2_graphC["Graph.c"]:::core
        pa2_graphH["Graph.h"]:::core
        pa2_listC["List.c"]:::core
        pa2_listH["List.h"]:::core
        pa2_test["GraphTest.c"]:::test
        pa2_make["Build (Makefile)"]:::build
        pa2_docs["Docs (README.md)"]:::doc
        pa2_find --> pa2_graphC
        pa2_find --> pa2_listC
        pa2_test --> pa2_graphC
        pa2_make --> pa2_find
        pa2_make --> pa2_graphC
        pa2_make --> pa2_listC
    end

    subgraph "PA3 - Graph Connectivity and Testing (C)"
        pa3_findComp["FindComponents.c"]:::core
        pa3_graphC["Graph.c"]:::core
        pa3_graphH["Graph.h"]:::core
        pa3_listC["List.c"]:::core
        pa3_listH["List.h"]:::core
        pa3_test["GraphTest.c"]:::test
        pa3_make["Build (Makefile)"]:::build
        pa3_docs["Docs (README.md)"]:::doc
        pa3_findComp --> pa3_graphC
        pa3_test --> pa3_graphC
        pa3_make --> pa3_findComp
        pa3_make --> pa3_graphC
    end

    subgraph "PA4 - Matrix & Sparse Operations and List Functions (C)"
        pa4_matrixC["Matrix.c"]:::core
        pa4_matrixH["Matrix.h"]:::core
        pa4_sparse["Sparse.c"]:::core
        pa4_listC["List.c"]:::core
        pa4_listH["List.h"]:::core
        pa4_listTest["ListTest.c"]:::test
        pa4_matrixTest["MatrixTest.c"]:::test
        pa4_make["Build (Makefile)"]:::build
        pa4_docs["Docs (README.md)"]:::doc
        pa4_matrixC --> pa4_listC
        pa4_listTest --> pa4_listC
        pa4_matrixTest --> pa4_matrixC
        pa4_make --> pa4_matrixC
        pa4_make --> pa4_listC
        pa4_make --> pa4_sparse
    end

    subgraph "PA5 - Advanced List Manipulation and Shuffle (C++)"
        pa5_listCPP["List.cpp"]:::core
        pa5_listH["List.h"]:::core
        pa5_test["ListTest.cpp"]:::test
        pa5_shuffle["Shuffle.cpp"]:::core
        pa5_make["Build (Makefile)"]:::build
        pa5_docs["Docs (README.md)"]:::doc
        pa5_test --> pa5_listCPP
        pa5_make --> pa5_listCPP
        pa5_make --> pa5_shuffle
    end

    subgraph "PA6 - Big Integer Arithmetic with List Operations (C++)"
        pa6_arith["Arithmetic.cpp"]:::core
        pa6_bigIntCPP["BigInteger.cpp"]:::core
        pa6_bigIntH["BigInteger.h"]:::core
        pa6_bigIntTest["BigIntegerTest.cpp"]:::test
        pa6_listCPP["List.cpp"]:::core
        pa6_listH["List.h"]:::core
        pa6_listTest["ListTest.cpp"]:::test
        pa6_make["Build (Makefile)"]:::build
        pa6_docs["Docs (README.md)"]:::doc
        pa6_bigIntTest --> pa6_bigIntCPP
        pa6_listTest --> pa6_listCPP
        pa6_arith --> pa6_bigIntCPP
        pa6_make --> pa6_arith
        pa6_make --> pa6_listCPP
    end

    subgraph "PA7 - Dictionary Operations and Ordering (C++)"
        pa7_dictCPP["Dictionary.cpp"]:::core
        pa7_dictH["Dictionary.h"]:::core
        pa7_dictTest["DictionaryTest.cpp"]:::test
        pa7_order["Order.cpp"]:::core
        pa7_make["Build (Makefile)"]:::build
        pa7_docs["Docs (README.md)"]:::doc
        pa7_dictTest --> pa7_dictCPP
        pa7_make --> pa7_dictCPP
        pa7_make --> pa7_order
    end

    subgraph "PA8 - Dictionary and Word Frequency Analysis (C++)"
        pa8_dictCPP["Dictionary.cpp"]:::core
        pa8_dictH["Dictionary.h"]:::core
        pa8_dictTest["DictionaryTest.cpp"]:::test
        pa8_order["Order.cpp"]:::core
        pa8_wordFreq["WordFrequency.cpp"]:::core
        pa8_make["Build (Makefile)"]:::build
        pa8_docs["Docs (README.md)"]:::doc
        pa8_dictTest --> pa8_dictCPP
        pa8_make --> pa8_dictCPP
        pa8_make --> pa8_wordFreq
    end

    click course "https://github.com/derko510/cse-101/blob/main/README.md"

    click pa1_lex "https://github.com/derko510/cse-101/blob/main/pa1/Lex.c"
    click pa1_listC "https://github.com/derko510/cse-101/blob/main/pa1/List.c"
    click pa1_listH "https://github.com/derko510/cse-101/blob/main/pa1/List.h"
    click pa1_test "https://github.com/derko510/cse-101/blob/main/pa1/ListTest.c"
    click pa1_make "https://github.com/derko510/cse-101/tree/main/pa1/Makefile"
    click pa1_docs "https://github.com/derko510/cse-101/blob/main/pa1/README.md"

    click pa2_find "https://github.com/derko510/cse-101/blob/main/pa2/FindPath.c"
    click pa2_graphC "https://github.com/derko510/cse-101/blob/main/pa2/Graph.c"
    click pa2_graphH "https://github.com/derko510/cse-101/blob/main/pa2/Graph.h"
    click pa2_listC "https://github.com/derko510/cse-101/blob/main/pa2/List.c"
    click pa2_listH "https://github.com/derko510/cse-101/blob/main/pa2/List.h"
    click pa2_test "https://github.com/derko510/cse-101/blob/main/pa2/GraphTest.c"
    click pa2_make "https://github.com/derko510/cse-101/tree/main/pa2/Makefile"
    click pa2_docs "https://github.com/derko510/cse-101/blob/main/pa2/README.md"

    click pa3_findComp "https://github.com/derko510/cse-101/blob/main/pa3/FindComponents.c"
    click pa3_graphC "https://github.com/derko510/cse-101/blob/main/pa3/Graph.c"
    click pa3_graphH "https://github.com/derko510/cse-101/blob/main/pa3/Graph.h"
    click pa3_listC "https://github.com/derko510/cse-101/blob/main/pa3/List.c"
    click pa3_listH "https://github.com/derko510/cse-101/blob/main/pa3/List.h"
    click pa3_test "https://github.com/derko510/cse-101/blob/main/pa3/GraphTest.c"
    click pa3_make "https://github.com/derko510/cse-101/tree/main/pa3/Makefile"
    click pa3_docs "https://github.com/derko510/cse-101/blob/main/pa3/README.md"

    click pa4_matrixC "https://github.com/derko510/cse-101/blob/main/pa4/Matrix.c"
    click pa4_matrixH "https://github.com/derko510/cse-101/blob/main/pa4/Matrix.h"
    click pa4_sparse "https://github.com/derko510/cse-101/blob/main/pa4/Sparse.c"
    click pa4_listC "https://github.com/derko510/cse-101/blob/main/pa4/List.c"
    click pa4_listH "https://github.com/derko510/cse-101/blob/main/pa4/List.h"
    click pa4_listTest "https://github.com/derko510/cse-101/blob/main/pa4/ListTest.c"
    click pa4_matrixTest "https://github.com/derko510/cse-101/blob/main/pa4/MatrixTest.c"
    click pa4_make "https://github.com/derko510/cse-101/tree/main/pa4/Makefile"
    click pa4_docs "https://github.com/derko510/cse-101/blob/main/pa4/README.md"

    click pa5_listCPP "https://github.com/derko510/cse-101/blob/main/pa5/List.cpp"
    click pa5_listH "https://github.com/derko510/cse-101/blob/main/pa5/List.h"
    click pa5_test "https://github.com/derko510/cse-101/blob/main/pa5/ListTest.cpp"
    click pa5_shuffle "https://github.com/derko510/cse-101/blob/main/pa5/Shuffle.cpp"
    click pa5_make "https://github.com/derko510/cse-101/tree/main/pa5/Makefile"
    click pa5_docs "https://github.com/derko510/cse-101/blob/main/pa5/README.md"

    click pa6_arith "https://github.com/derko510/cse-101/blob/main/pa6/Arithmetic.cpp"
    click pa6_bigIntCPP "https://github.com/derko510/cse-101/blob/main/pa6/BigInteger.cpp"
    click pa6_bigIntH "https://github.com/derko510/cse-101/blob/main/pa6/BigInteger.h"
    click pa6_bigIntTest "https://github.com/derko510/cse-101/blob/main/pa6/BigIntegerTest.cpp"
    click pa6_listCPP "https://github.com/derko510/cse-101/blob/main/pa6/List.cpp"
    click pa6_listH "https://github.com/derko510/cse-101/blob/main/pa6/List.h"
    click pa6_listTest "https://github.com/derko510/cse-101/blob/main/pa6/ListTest.cpp"
    click pa6_make "https://github.com/derko510/cse-101/tree/main/pa6/Makefile"
    click pa6_docs "https://github.com/derko510/cse-101/blob/main/pa6/README.md"

    click pa7_dictCPP "https://github.com/derko510/cse-101/blob/main/pa7/Dictionary.cpp"
    click pa7_dictH "https://github.com/derko510/cse-101/blob/main/pa7/Dictionary.h"
    click pa7_dictTest "https://github.com/derko510/cse-101/blob/main/pa7/DictionaryTest.cpp"
    click pa7_order "https://github.com/derko510/cse-101/blob/main/pa7/Order.cpp"
    click pa7_make "https://github.com/derko510/cse-101/tree/main/pa7/Makefile"
    click pa7_docs "https://github.com/derko510/cse-101/blob/main/pa7/README.md"

    click pa8_dictCPP "https://github.com/derko510/cse-101/blob/main/pa8/Dictionary.cpp"
    click pa8_dictH "https://github.com/derko510/cse-101/blob/main/pa8/Dictionary.h"
    click pa8_dictTest "https://github.com/derko510/cse-101/blob/main/pa8/DictionaryTest.cpp"
    click pa8_order "https://github.com/derko510/cse-101/blob/main/pa8/Order.cpp"
    click pa8_wordFreq "https://github.com/derko510/cse-101/blob/main/pa8/WordFrequency.cpp"
    click pa8_make "https://github.com/derko510/cse-101/tree/main/pa8/Makefile"
    click pa8_docs "https://github.com/derko510/cse-101/blob/main/pa8/README.md"

    classDef header fill:#FFD700,stroke:#DAA520,stroke-width:2px;
    classDef core fill:#BBF,stroke:#333,stroke-width:2px;
    classDef test fill:#FBB,stroke:#333,stroke-dasharray: 5 5,stroke-width:2px;
    classDef build fill:#BFB,stroke:#333,stroke-width:2px;
    classDef doc fill:#EFE,stroke:#333,stroke-width:2px;
```
