{"id":27862490,"url":"https://github.com/chaganti-reddy/maps_c","last_synced_at":"2025-05-04T20:29:28.159Z","repository":{"id":290422236,"uuid":"974397799","full_name":"Chaganti-Reddy/maps_C","owner":"Chaganti-Reddy","description":"Hashmaps implementation in C language","archived":false,"fork":false,"pushed_at":"2025-04-28T18:11:20.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-28T19:25:20.100Z","etag":null,"topics":["c","data-structures","hashmap-c"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Chaganti-Reddy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2025-04-28T18:01:18.000Z","updated_at":"2025-04-28T18:11:55.000Z","dependencies_parsed_at":"2025-04-28T19:25:22.770Z","dependency_job_id":"50c9ae33-b9e6-44f5-8ca0-83c830d3dc68","html_url":"https://github.com/Chaganti-Reddy/maps_C","commit_stats":null,"previous_names":["chaganti-reddy/maps_c"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chaganti-Reddy%2Fmaps_C","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chaganti-Reddy%2Fmaps_C/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chaganti-Reddy%2Fmaps_C/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chaganti-Reddy%2Fmaps_C/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Chaganti-Reddy","download_url":"https://codeload.github.com/Chaganti-Reddy/maps_C/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252394946,"owners_count":21740932,"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":["c","data-structures","hashmap-c"],"created_at":"2025-05-04T20:29:27.186Z","updated_at":"2025-05-04T20:29:28.150Z","avatar_url":"https://github.com/Chaganti-Reddy.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# maps_C\n\n**A Basic Hashmap (Key-Value Store) Implementation in C**\n\n---\n\n## 📚 Overview\n\n`maps_C` is a simple and lightweight **hash map** (key-value store) built using C.  \nIt supports **insertion**, **retrieval**, **deletion**, **updating**, and **printing** of key-value pairs with dynamic memory management. Collision handling is managed through **chaining** using **linked lists**.\n\nPerfect for:\n- Practicing C programming and pointers\n- Learning how basic data structures work internally\n- Exploring hashing, collisions, and memory handling\n\n---\n\n## ⚙️ Features\n\n- 🛠 Insert a key-value pair\n- 🔎 Retrieve a value by key\n- 🧹 Delete a key\n- ✏️ Update a key’s value\n- 📜 Print the entire hashmap\n- 📏 Get the number of entries\n- 🧹 Proper memory cleanup\n\n---\n\n## 🗂️ Project Structure\n\n```bash\nmaps_C/\n├── LICENSE         # License file (MIT)\n├── main.c          # Program with interactive menu to use the hashmap\n├── map.c           # Implementation of hashmap functions\n├── map.h           # Header file (definitions and function declarations)\n├── Makefile        # For easy compilation\n├── maps            # Compiled executable\n├── README.md       # Project documentation (this file)\n├── map.o           # Object file for map.c\n├── main.o          # Object file for main.c\n```\n\n---\n\n## 🚀 Getting Started\n\n### Prerequisites\n- GCC or any C compiler\n- Basic familiarity with terminal commands\n\n### Building and Running\n\n```bash\n# Clone the repository\ngit clone https://github.com/Chaganti-Reddy/maps_C.git\ncd maps_C\n\n# Compile using Makefile\nmake\n\n# Run the executable\n./maps\n```\n\nAlternatively, compile manually:\n```bash\ngcc main.c map.c -o maps\n./maps\n```\n\n---\n\n## 📖 Example Usage (Menu Options)\n\nOn running the program, you can:\n\n```\n1. Insert    → Add a key-value pair\n2. Get       → Retrieve the value for a given key\n3. Delete    → Remove a key and its value\n4. Print     → Display all key-value pairs\n5. Length    → Show the number of stored pairs\n6. Update    → Modify the value of an existing key\n7. Exit      → Free memory and exit\n```\n\n---\n\n## 🧠 Core Concepts Demonstrated\n\n- Hashing with modulus operator\n- Collision resolution with **chaining** (linked lists)\n- Dynamic memory allocation with `malloc`, `calloc`, and `free`\n- Modular programming in C (`.h` and `.c` separation)\n- Basic CLI-based interface\n\n---\n\n## 📋 Limitations\n\n- Fixed array size (`SIZE = 100`), no dynamic resizing\n- Only supports integer keys and integer values\n- Not thread-safe (designed for single-threaded environments)\n\n---\n\n## 📝 License\n\nThis project is licensed under the [MIT License](LICENSE).\n\n---\n\n## 🤝 Contributing\n\nFeel free to open issues or submit pull requests!  \nImprovements, optimizations, and feature additions are very welcome.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchaganti-reddy%2Fmaps_c","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchaganti-reddy%2Fmaps_c","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchaganti-reddy%2Fmaps_c/lists"}