# omkarpathak/python-programs architecture

> Architecture diagram of the GitHub repository omkarpathak/python-programs, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-02-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/omkarpathak/python-programs
- Repository: https://github.com/omkarpathak/python-programs

## Overview

##### Main Components Organization

**[Core Educational Components]**
- Algorithms
- Sorting Algorithms
- Searching Algorithms
- Data Structures
- Programming Concepts
- Applications & Tools

##### Component Relationships

a) Core Educational Components:
- Sorting Algorithms (8+ implementations)
- Relationship to their test cases
- To common utility functions
- Searching Algorithms (3 implementations)
- To their respective data structure dependencies

b) Data Structures Implementation:
- Basic Structures (Arrays, Lists)
- Complex Structures (Trees, Graphs)
- Inheritance relationships between related structures

c) Application Components:
- Scripts & Tools
- Mini Projects
- Competitive Programming Solutions

- Rectangles: Main components
- Rounded Rectangles: Implementation modules
- Hexagons: External dependencies
- Diamonds: Decision points in algorithms

- Blue: Core algorithms
- Green: Data structures
- Orange: Applications
- Gray: Utility functions

##### Implementation Details

Create sections showing:

**[Algorithm Implementations]**
- Sorting (Selection, Bubble, etc.)
- Searching (Binary, Sequential)
- Graph Algorithms (BFS, DFS)

**[Data Structure Implementations]**
- Linear (Arrays, Lists, Stacks)
- Trees (Binary, BST)
- Graphs

##### Key Relationships to Highlight

- Dependencies between algorithms and their required data structures
- Inheritance relationships in OOP implementations
- Utility functions to their consuming components
- Test cases to their respective implementations

**→ : Uses/Depends on**
**⇢ : Inherits from**
**⇄ : Interacts with**
**● : Implementation**
**□ : Interface/Abstract**

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph Core["Core Educational Components"]
        direction TB
        
        subgraph Algorithms["Algorithms"]
            direction TB
            
            subgraph Sorting["Sorting Algorithms"]
                direction TB
                Selection["Selection Sort"]:::algorithm
                Bubble["Bubble Sort"]:::algorithm
                Insertion["Insertion Sort"]:::algorithm
                Merge["Merge Sort"]:::algorithm
                Quick["Quick Sort"]:::algorithm
                Counting["Counting Sort"]:::algorithm
                Bucket["Bucket Sort"]:::algorithm
                Shell["Shell Sort"]:::algorithm
                Heap["Heap Sort"]:::algorithm
            end
            
            subgraph Searching["Searching Algorithms"]
                direction TB
                Sequential["Sequential Search"]:::algorithm
                Binary["Binary Search"]:::algorithm
                Nary["N-ary Search"]:::algorithm
            end
            
            subgraph GraphAlgo["Graph Algorithms"]
                direction TB
                DFS["Depth First Search"]:::algorithm
                BFS["Breadth First Search"]:::algorithm
                Topo["Topological Sort"]:::algorithm
            end
        end
        
        subgraph DataStructures["Data Structures"]
            direction TB
            Array["Array"]:::datastructure
            SLL["Singly Linked List"]:::datastructure
            DLL["Doubly Linked List"]:::datastructure
            Stack["Stack"]:::datastructure
            Queue["Queue"]:::datastructure
            BST["Binary Search Tree"]:::datastructure
            BT["Binary Tree"]:::datastructure
            Graph["Graph"]:::datastructure
            HashTable["Hash Table"]:::datastructure
        end
        
        subgraph OOP["Object-Oriented Programming"]
            direction TB
            Class["Class Definition"]:::oop
            Methods["Instance Methods"]:::oop
            Attributes["Instance Attributes"]:::oop
            Inheritance["Inheritance"]:::oop
            MoreInheritance["More on Inheritance"]:::oop
            MultiInheritance["Multiple Inheritance"]:::oop
        end
    end
    
    subgraph Tools["Applications & Tools"]
        direction TB
        
        subgraph CompProg["Competitive Programming"]
            CodeChef["CodeChef Solutions"]:::tool
            HackerEarth["HackerEarth Solutions"]:::tool
            SPOJ["SPOJ Solutions"]:::tool
        end
        
        subgraph Utils["Utility Scripts"]
            FolderMan["Folder Manipulation"]:::tool
            FileCount["File Count"]:::tool
            FileOrg["File Organizer"]:::tool
            Mail["Send Mail Script"]:::tool
            Reminder["Reminder Application"]:::tool
        end
        
        subgraph ML["Machine Learning"]
            GradDesc["Gradient Descent"]:::ml
        end
        
        subgraph NumPy["NumPy Implementation"]
            NumIntro["Introduction"]:::numpy
            NumTypes["Data Types"]:::numpy
            NumAttr["Attributes"]:::numpy
        end
    end
    
    %% Relationships
    GraphAlgo --> Graph
    Sorting --> Array
    Searching --> Array
    BST --> BT
    
    %% Style Definitions
    classDef algorithm fill:#a8d5ff,stroke:#333,stroke-width:2px
    classDef datastructure fill:#98ff98,stroke:#333,stroke-width:2px
    classDef oop fill:#ffb366,stroke:#333,stroke-width:2px
    classDef tool fill:#d3d3d3,stroke:#333,stroke-width:2px
    classDef ml fill:#ff9999,stroke:#333,stroke-width:2px
    classDef numpy fill:#ffff99,stroke:#333,stroke-width:2px
    
    %% Click Events
    click Selection "https://github.com/OmkarPathak/Python-Programs/blob/master/Programs/P24_SelectionSort.py"
    click Bubble "https://github.com/OmkarPathak/Python-Programs/blob/master/Programs/P25_BubbleSort.py"
    click Insertion "https://github.com/OmkarPathak/Python-Programs/blob/master/Programs/P26_InsertionSort.py"
    click Merge "https://github.com/OmkarPathak/Python-Programs/blob/master/Programs/P27_MergeSort.py"
    click Quick "https://github.com/OmkarPathak/Python-Programs/blob/master/Programs/P28_QuickSort.py"
    click Counting "https://github.com/OmkarPathak/Python-Programs/blob/master/Programs/P48_CountingSort.py"
    click Bucket "https://github.com/OmkarPathak/Python-Programs/blob/master/Programs/P52_BucketSort.py"
    click Shell "https://github.com/OmkarPathak/Python-Programs/blob/master/Programs/P53_ShellSort.py"
    click Heap "https://github.com/OmkarPathak/Python-Programs/blob/master/Programs/P66_HeapSort.py"
    click Sequential "https://github.com/OmkarPathak/Python-Programs/blob/master/Programs/P22_SequentialSearch.py"
    click Binary "https://github.com/OmkarPathak/Python-Programs/blob/master/Programs/P23_BinarySearch.py"
    click Nary "https://github.com/OmkarPathak/Python-Programs/blob/master/Programs/P35_NarySearch.py"
    click Array "https://github.com/OmkarPathak/Python-Programs/blob/master/Programs/P30_Array.py"
    click SLL "https://github.com/OmkarPathak/Python-Programs/blob/master/Programs/P31_SinglyLinkedList.py"
    click DLL "https://github.com/OmkarPathak/Python-Programs/blob/master/Programs/P33_DoublyLinkedList.py"
    click Stack "https://github.com/OmkarPathak/Python-Programs/blob/master/Programs/P34_Stack.py"
    click Queue "https://github.com/OmkarPathak/Python-Programs/blob/master/Programs/P39_Queue.py"
    click BST "https://github.com/OmkarPathak/Python-Programs/blob/master/Programs/P43_BinarySearchTree.py"
    click BT "https://github.com/OmkarPathak/Python-Programs/blob/master/Programs/P62_BinaryTree.py"
    click Graph "https://github.com/OmkarPathak/Python-Programs/blob/master/Programs/P63_Graph.py"
    click HashTable "https://github.com/OmkarPathak/Python-Programs/blob/master/Programs/P78_HashTable.py"
    click Class "https://github.com/OmkarPathak/Python-Programs/blob/master/OOP/P01_ClassDefinition.py"
    click Methods "https://github.com/OmkarPathak/Python-Programs/blob/master/OOP/P02_InstanceMethods.py"
    click Attributes "https://github.com/OmkarPathak/Python-Programs/blob/master/OOP/P03_InstanceAttributes.py"
    click Inheritance "https://github.com/OmkarPathak/Python-Programs/blob/master/OOP/P06_Inheritance.py"
    click MoreInheritance "https://github.com/OmkarPathak/Python-Programs/blob/master/OOP/P07_MoreOnInheritance.py"
    click MultiInheritance "https://github.com/OmkarPathak/Python-Programs/blob/master/OOP/P08_MultipleInheritence.py"
    click DFS "https://github.com/OmkarPathak/Python-Programs/blob/master/Programs/P64_DepthFirstTraversal.py"
    click BFS "https://github.com/OmkarPathak/Python-Programs/blob/master/Programs/P65_BreadthFirstTraversal.py"
    click Topo "https://github.com/OmkarPathak/Python-Programs/blob/master/Programs/P68_TopologicalSort.py"
    click CodeChef "https://github.com/OmkarPathak/Python-Programs/tree/master/CompetitiveProgramming/CodeChef"
    click HackerEarth "https://github.com/OmkarPathak/Python-Programs/tree/master/CompetitiveProgramming/HackerEarth"
    click SPOJ "https://github.com/OmkarPathak/Python-Programs/tree/master/CompetitiveProgramming/SPOJ"
    click FolderMan "https://github.com/OmkarPathak/Python-Programs/blob/master/Scripts/P01_FolderManipulation.py"
    click FileCount "https://github.com/OmkarPathak/Python-Programs/blob/master/Scripts/P02_FileCount.py"
    click FileOrg "https://github.com/OmkarPathak/Python-Programs/blob/master/Scripts/P05_FileOrganizer.py"
    click Mail "https://github.com/OmkarPathak/Python-Programs/blob/master/Scripts/P07_ScriptToSendMail.py"
    click Reminder "https://github.com/OmkarPathak/Python-Programs/blob/master/Scripts/P09_ReminderApplication.py"
    click GradDesc "https://github.com/OmkarPathak/Python-Programs/blob/master/MachineLearning/gradient_descent.py"
    click NumIntro "https://github.com/OmkarPathak/Python-Programs/blob/master/Numpy/P01_Introduction.py"
    click NumTypes "https://github.com/OmkarPathak/Python-Programs/blob/master/Numpy/P02_NumpyDataTypes.py"
    click NumAttr "https://github.com/OmkarPathak/Python-Programs/blob/master/Numpy/P03_NumpyAttributes.py"
```
