{"id":31955709,"url":"https://github.com/theronwolcott/data-structure-phonebook","last_synced_at":"2025-10-14T14:27:22.895Z","repository":{"id":310712034,"uuid":"774677945","full_name":"theronwolcott/data-structure-phonebook","owner":"theronwolcott","description":"This project implements Ordered Linear Probing (OLP) and Quadratic Probing (QP) for collision resolution in hash tables, supporting soft deletion, hard deletion, and auto-resizing with prime number capacities for optimal performance.","archived":false,"fork":false,"pushed_at":"2025-08-19T18:36:05.000Z","size":334,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-19T20:39:38.909Z","etag":null,"topics":["data-structures","hash-tables","java"],"latest_commit_sha":null,"homepage":"","language":"Java","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/theronwolcott.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,"zenodo":null}},"created_at":"2024-03-20T01:10:04.000Z","updated_at":"2025-08-19T18:36:09.000Z","dependencies_parsed_at":"2025-08-19T20:39:48.516Z","dependency_job_id":"a7b8cf84-7bdd-464b-96d2-552880baf1eb","html_url":"https://github.com/theronwolcott/data-structure-phonebook","commit_stats":null,"previous_names":["theronwolcott/data-structure-phonebook"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/theronwolcott/data-structure-phonebook","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theronwolcott%2Fdata-structure-phonebook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theronwolcott%2Fdata-structure-phonebook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theronwolcott%2Fdata-structure-phonebook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theronwolcott%2Fdata-structure-phonebook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theronwolcott","download_url":"https://codeload.github.com/theronwolcott/data-structure-phonebook/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theronwolcott%2Fdata-structure-phonebook/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279019119,"owners_count":26086680,"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","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["data-structures","hash-tables","java"],"created_at":"2025-10-14T14:27:18.049Z","updated_at":"2025-10-14T14:27:22.889Z","avatar_url":"https://github.com/theronwolcott.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Advanced Hash Table Implementations\n\nThis project implements **Ordered Linear Probing (OLP)** and **Quadratic Probing (QP)** as advanced collision resolution techniques for open-addressed hash tables. These methods enhance search efficiency and manage clustering more effectively.\n\n## Features\n\n- **Ordered Linear Probing (OLP):**\n  - Maintains ordered collision chains to ensure faster failure for unsuccessful searches.\n  - Efficiently handles key insertion while preserving searchability.\n\n- **Quadratic Probing (QP):**\n  - Uses a quadratic step function to reduce clustering.\n  - Provides a balanced dispersion of keys in the hash table.\n\n- **Soft and Hard Deletion:**\n  - Implements tombstone markers for soft deletion to maintain collision chain integrity.\n  - Hard deletion reinserts keys to maintain hash table structure.\n\n- **Resizing Policies:**\n  - Automatically resizes the hash table when load exceeds 50%.\n  - Utilizes prime number capacities for optimal hash distribution.\n \n# Usage\n\n## Ordered Linear Probing\nThe `OrderedLinearProbingHashTable` class implements the OLP technique. Keys are inserted while maintaining order in collision chains.\n\n```java\nOrderedLinearProbingHashTable\u003cString, Integer\u003e olpTable = new OrderedLinearProbingHashTable\u003c\u003e(false);\nolpTable.put(\"entropy\", 42);\nolpTable.put(\"gorilla\", 27);\n```\n\n## Quadtratic Probing\nThe 'QuadraticProbingHashTable' class implements QP, using a quadratic function to resolve collisions.\n```java\nQuadraticProbingHashTable\u003cString, Integer\u003e qpTable = new QuadraticProbingHashTable\u003c\u003e(true);\nqpTable.put(\"entropy\", 42);\nqpTable.put(\"gorilla\", 27);\n```\n\n## Soft Deletion\nBoth hash table implementations support soft deletion using a tombstone marker.\n```java\nolpTable.remove(\"entropy\"); // Soft delete\nqpTable.remove(\"gorilla\"); // Soft delete\n```\n\n## Resizing\nThe hash tables automatically resize when the load factor exceeds 50%. Capacity is adjusted to the next prime number.\n\n# Performance\nBoth OLP and QP are evaluated for:\n\n  - Collision resolution efficiency.\n  - Search operation speed (successful and unsuccessful).\n  - Impact of soft vs. hard deletion.\n\n# Trade-offs\n| Feature             | Ordered Linear Probing | Quadratic Probing |\n|---------------------|------------------------|-------------------|\n| Clustering          | Moderate               | Low               |\n| Cache Locality      | High                   | Moderate          |\n| Deletion Complexity | Simple (Soft)          | Reinsertion Needed|\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheronwolcott%2Fdata-structure-phonebook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheronwolcott%2Fdata-structure-phonebook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheronwolcott%2Fdata-structure-phonebook/lists"}