{"id":26494700,"url":"https://github.com/irvingfsanchez/algorithm-data-structures","last_synced_at":"2026-04-14T19:32:50.718Z","repository":{"id":282645934,"uuid":"949215821","full_name":"IrvingFSanchez/Algorithm-Data-Structures","owner":"IrvingFSanchez","description":"This repository is dedicated to all of my Algorithm and Data Structures I have been working at during my time at Lewis University and will later be updated to better features. ","archived":false,"fork":false,"pushed_at":"2025-03-16T01:53:29.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-16T02:28:42.538Z","etag":null,"topics":["algorithms","data-engineering","educational","linux","mac","pip","python","visual-studio-code","windows"],"latest_commit_sha":null,"homepage":"https://irving.cyberkineticengineering.com/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IrvingFSanchez.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-15T23:43:20.000Z","updated_at":"2025-03-16T01:53:32.000Z","dependencies_parsed_at":"2025-03-16T02:28:43.986Z","dependency_job_id":"df30e8f1-e897-496e-ba42-4e9859cc4271","html_url":"https://github.com/IrvingFSanchez/Algorithm-Data-Structures","commit_stats":null,"previous_names":["irvingfsanchez/algorithm-data-structures"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IrvingFSanchez%2FAlgorithm-Data-Structures","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IrvingFSanchez%2FAlgorithm-Data-Structures/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IrvingFSanchez%2FAlgorithm-Data-Structures/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IrvingFSanchez%2FAlgorithm-Data-Structures/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IrvingFSanchez","download_url":"https://codeload.github.com/IrvingFSanchez/Algorithm-Data-Structures/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244592975,"owners_count":20477995,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithms","data-engineering","educational","linux","mac","pip","python","visual-studio-code","windows"],"created_at":"2025-03-20T10:24:24.197Z","updated_at":"2025-10-29T08:06:44.467Z","avatar_url":"https://github.com/IrvingFSanchez.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📚 Algorithm \u0026 Data Structures 🚀\n\nWelcome to the **Algorithm-Data-Structures** repository! This is a collection of Python projects exploring core concepts in **data structures** and **algorithmic problem-solving**. Each project tackles a unique challenge, from **directory traversal** to **memory management simulations**, with a mix of efficiency, creativity, and a bit of personal flair.\n\n---\n\n## 📌 Projects Overview\n\n### ⏱️ **Sorting Algorithm Benchmark** (`sorting-benchmark.py`)\n\n- **Compares performance** of Bubble Sort vs Quick Sort on real-world datasets:\n  - Pokémon stats (~1,000 entries)\n  - MTG tokens (~5,000 entries)\n  - Video games (~10,000 entries)\n- **Interactive menu system** for dataset/field selection\n- **Configurable data preparation**:\n  - 🎲 Fully randomized order\n  - 🔄 Almost-sorted (95% sorted, 5% swapped)\n- **Benchmarking features**:\n  - 5 timed runs per algorithm\n  - Auto-generated performance graphs\n  - Option to save sorted results (e.g., `Pokemon_Name_sorted_data.txt`)\n- **Visualization**:\n  - 🟥 Bubble Sort vs 🟩 Quick Sort timing comparison\n  - Average performance lines\n  - Annotated millisecond values\n\n---\n\n### 🧠 Brain Filing System: Custom Hash Table ADT\n\n- A metaphorical hash table designed as a **Brain Filing System**, where:\n  - Keys are *thoughts* 🧠\n  - Values are *memories* 📦\n  - Drawers represent slots in the internal fixed-size list\n- Implements core hash table operations:\n  - `store_memory()` → insert/update (put)\n  - `recall_memory()` → retrieve (get)\n  - `forget_memory()` → delete (remove)\n- Uses **Python's built-in `hash()` function** and modulo operation\n- Collision handling with **separate chaining (list-based)**\n- Features two simulation runs:\n  - **Standard Brain** with 10 drawers\n  - **Tiny Brain** with 2 drawers (forces collisions)\n- Includes structured comment blocks\n\n📌 **Concepts applied**: **Abstract Data Types**, **Hashing**, **Collision Handling**, **Chaining**, **Python Lists**, **Modular Arithmetic**\n\n🧾 **Final Reflection \u0026 Write-Up:** [Located in the Hash Table README](./Hash-Table/README.md), including project insight, hash behavior analysis, and chaining validation.\n\n---\n\n### 🌳 **Tree ADT Implementation** (`forest_manager.py`)\n\n- **General tree structure** with botanical naming conventions (nodes as trees, children as branches)\n- **Three traversal methods**:\n  - 🌱 Preorder (Root → Children)\n  - 🍂 Postorder (Children → Root)\n  - 🌍 Breadth-First (Level Order)\n- **Clear visual representation** using Mermaid diagrams\n- **Practical applications**:\n  - File system navigation\n  - Organization charts\n  - Decision tree algorithms\n- Includes:\n  - Recursive traversal implementations\n  - Queue-based breadth-first search\n  - Comprehensive test cases\n  \n```mermaid\nflowchart TD\n    A --\u003e B --\u003e E\n    B --\u003e F\n    A --\u003e C\n    A --\u003e D --\u003e G --\u003e H\n    G --\u003e I\n    G --\u003e J\n```\n\n---\n\n### 🔗 **Linked List Implementations** (`singlylinked.py`, `doublylinked.py`)\n\n- **Singly Linked List** with O(1) `add_first`/`add_last` operations\n  - Tail pointer optimization for efficient appends\n  - Full suite of operations: insert/delete/search\n- **Doubly Linked List** with bidirectional traversal\n  - O(1) operations at both ends\n  - Real-world applications (browser history, undo systems)\n- Includes:\n  - Big-O complexity analysis\n  - Edge case handling\n  - Interactive test cases\n\n📌 **Concepts applied**: **Pointer Manipulation**, **Time Complexity**, **Bidirectional Traversal**, **Memory Efficiency**\n\n## 🚀 Key Features of Linked List Project\n\n| Feature          | Singly-Linked | Doubly-Linked |\n|------------------|---------------|---------------|\n| **Insert at Head** | ✅ O(1)       | ✅ O(1)       |\n| **Insert at Tail** | ✅ O(1)       | ✅ O(1)       |\n| **Delete Middle**  | ⚠️ O(n)      | ⚠️ O(n)      |\n| **Traversal**      | → Only        | ↔ Bidirectional |\n\n**Real-World Use Cases**:\n\n- Music playlists (singly-linked)\n- Browser history (doubly-linked)\n- Undo/redo systems\n\n---\n\n### 🎥 **Movie Recommendation \u0026 Directory Traversal** (`main.py`)\n\n- Implements **recursive directory traversal** to locate and load **movie data** from text files.\n- Uses a **Deque (double-ended queue)** for **movie storage and recommendations**.\n- Features a **speakeasy-style UI**, inspired by 1920s slang, for a fun **interactive menu system**.\n- Offers:\n  - **Movie listing \u0026 searching with autocomplete**\n  - **Personalized recommendations**\n  - **Top-rated movie selections**\n- Libraries used: `os`, `pyfiglet`, `colorama`\n\n📌 **Concepts applied**: **Recursion**, **Deque ADT**, **File I/O**, **Error Handling**, **Sorting Algorithms**\n\n---\n\n### 💧 **Health Tracker** (`health_tracker.py`)\n\n- A simple **daily health logger** to track:\n  - 💦 **Water intake** (goal: 64 oz/day)\n  - 🏃 **Activity minutes** (goal: 30 min/day)\n- **User-friendly CLI menu** for logging data.\n- **Encouraging messages** based on progress.\n- **Data reset feature** to start fresh every day.\n- **Error handling** to prevent invalid inputs.\n\n📌 **Concepts applied**: **User Input Handling**, **Looping Constructs**, **Conditionals**, **Global Variables \u0026 Constants**\n\n---\n\n### 📂 **Directory Tree Traversal** (`directory_traverse.py`)\n\n- **Recursive function** to traverse **file directories**.\n- **Indentation formatting** for a **tree-like output**.\n- **Error handling** for permission and path issues.\n- **Latin-inspired variable names** for a touch of creativity.\n\n📌 **Concepts applied**: **Recursion**, **Tree Representation**, **Error Handling**, **Python Generators**\n\n---\n\n### 🔑 **School Locker System (Dynamic Array Simulation)** (`school_locker.py`)\n\n- **Mimics low-level memory management** like **C-based array handling**.\n- **Dynamic resizing** for efficient memory allocation.\n- Features:\n  - **Locker Addition \u0026 Insertion**\n  - **Locker Removal**\n  - **Locker Search**\n  - **Dynamic Expansion**\n- Uses **ctypes** for raw memory allocation.\n\n📌 **Concepts applied**: **Dynamic Arrays**, **Memory Allocation**, **Custom Data Structures**\n\n---\n\n## 🚀 **Getting Started**\n\n### 🛠 Prerequisites\n\nEnsure you have Python **3.x** installed. Some projects require:\n\n```bash\npip install pyfiglet colorama\n```\n\n### ▶ **Running a Project**\n\nTo execute a project, simply run:\n\n```bash\npython filename.py\n```\n\nFor example:\n\n```bash\npython main.py\n```\n\n---\n\n## 🤓 **Why This Repo?**\n\nThis repository is a hands-on **exploration of data structures** through practical applications. Instead of just theory, each project **applies ADTs in creative ways** to solve real-world problems.\n\n**Stay tuned for more projects \u0026 optimizations!** ✨\n\n---\n\n🎯 **Built with Python** | 🧠 **By Irving F. Sanchez** | 🏛 **Lewis University, CPSC-34000-002**\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Firvingfsanchez%2Falgorithm-data-structures","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Firvingfsanchez%2Falgorithm-data-structures","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Firvingfsanchez%2Falgorithm-data-structures/lists"}