{"version":"1.0","type":"rich","title":"Trie.js - super simple JavaScript implementation","description":"This example shows a trie data structure implemented in plain JavaScript, demonstrating how words are inserted, searched, and retrieved by prefix. The code defines `TrieNode` and `Trie` classes with methods for `insert`, `contains`, and `find`, where `find` recursively collects all words matching a prefix. The implementation uses the standard trie operations of traversing child nodes via a hash map and tracking word endings with an `end` flag. The console output verifies the results for the words \"hello\" and \"helium\", showing the expected prefix matches.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-43be059c2579b95d697773b631c3671d?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}