{"id":37124288,"url":"https://github.com/maknahar/trie","last_synced_at":"2026-01-14T14:21:22.007Z","repository":{"id":57609531,"uuid":"116303434","full_name":"maknahar/trie","owner":"maknahar","description":"Thread Safe Implementation of Trie Data Structure in Go","archived":false,"fork":false,"pushed_at":"2018-01-20T15:02:35.000Z","size":32,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-06-20T15:54:31.658Z","etag":null,"topics":["data-structures","golang","tree-structure","trie"],"latest_commit_sha":null,"homepage":"","language":"Go","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/maknahar.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}},"created_at":"2018-01-04T20:15:59.000Z","updated_at":"2024-06-20T15:54:31.659Z","dependencies_parsed_at":"2022-08-27T11:32:08.579Z","dependency_job_id":null,"html_url":"https://github.com/maknahar/trie","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/maknahar/trie","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maknahar%2Ftrie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maknahar%2Ftrie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maknahar%2Ftrie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maknahar%2Ftrie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maknahar","download_url":"https://codeload.github.com/maknahar/trie/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maknahar%2Ftrie/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28422719,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T13:30:50.153Z","status":"ssl_error","status_checked_at":"2026-01-14T13:29:08.907Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","golang","tree-structure","trie"],"created_at":"2026-01-14T14:21:21.457Z","updated_at":"2026-01-14T14:21:21.991Z","avatar_url":"https://github.com/maknahar.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Trie\nGo Implementation of a Thread Safe Trie Data Structure and (some of) Trie *Operations*\n\n```\ntrie := New().Insert(\"foo\", \"bar\", \"baz\")\n\ntrie.PrefixSearch(\"fo\")                 // returns true\ntrie.PrefixSearch(\"fb\")                 // returns false\ntrie.Search(\"fo\")                       // returns false\ntrie.Search(\"foo\")                      // returns true\n\n```\n\nCode documentation can be found [here][1].\n\n[1]: https://godoc.org/github.com/maknahar/trie\n\n# Supported Operation\n\n## Operations on Trie Data Structure Level\n\n- **New() \\*Trie**\n\n    Creates an initialized trie data structure\n\n- **Insert(keywords ...string)**\n\n    Insert allow one or more keyword to be inserted in trie.\n    keyword can be any valid Unicode string\n\n- **PrefixSearch(Key string) (found bool)**\n\n    Search checks if keyword exist in trie as a keyword or prefix to\n     keyword\n\n- **Search(keyword string) (found bool)**\n\n    PrefixSearch checks if keyword exist in trie as a fully qualified\n     keyword.\n\n- **Delete(keyword string)**\n\n    Delete deletes a keyword from a trie if keyword exist in trie\n\n- **DeleteBranch(key string)**\n\n    DeleteBranch deletes all child after last letter of key if key\n     exists in trie. If key is found, key will be treated as a keyword after this operation\n\n## Operations on Node Level\n\n\n- **CreateNode(v rune) \\*Node**\n\n    CreateNode returns an initialized trie node\n\n- **AddChildNode(v rune) \\*Node**\n\n    AddChildNode add child node to current node with value v\n\n- **Len() int**\n\n    Len returns the number of children for node\n\n- **IsLeafNode() bool**\n\n    IsLeafNode returns true if current node is a leaf node in Trie\n\n- **GetChildNode(v rune) (node \\*Node, exist bool)**\n\n    GetChildNode retrieve child node with value v.\n\n- **DeleteChildNode(v rune)**\n\n    DeleteChildNode Deletes the child node if it exist\n\nYour ideas and suggestions are always welcome. Either in form of issues or Pull Requests.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaknahar%2Ftrie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaknahar%2Ftrie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaknahar%2Ftrie/lists"}