{"id":23224031,"url":"https://github.com/junaidsalim/word_searcher_using_bst","last_synced_at":"2025-04-05T16:44:31.172Z","repository":{"id":216435877,"uuid":"741329670","full_name":"JunaidSalim/Word_Searcher_using_BST","owner":"JunaidSalim","description":"This repository contains Word Searcher Program implemented in C++ using BST","archived":false,"fork":false,"pushed_at":"2024-01-17T16:56:47.000Z","size":59,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-11T13:52:24.655Z","etag":null,"topics":["binary-search-tree","cpp","dsa","tree","word-search"],"latest_commit_sha":null,"homepage":"","language":"C++","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/JunaidSalim.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":"2024-01-10T07:04:21.000Z","updated_at":"2024-02-11T08:23:06.000Z","dependencies_parsed_at":"2024-12-18T23:30:00.467Z","dependency_job_id":"ac031c85-5b9e-415d-bc86-c9026185411c","html_url":"https://github.com/JunaidSalim/Word_Searcher_using_BST","commit_stats":null,"previous_names":["junaidsalim/word_searcher_using_bst"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JunaidSalim%2FWord_Searcher_using_BST","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JunaidSalim%2FWord_Searcher_using_BST/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JunaidSalim%2FWord_Searcher_using_BST/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JunaidSalim%2FWord_Searcher_using_BST/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JunaidSalim","download_url":"https://codeload.github.com/JunaidSalim/Word_Searcher_using_BST/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247369932,"owners_count":20927927,"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":["binary-search-tree","cpp","dsa","tree","word-search"],"created_at":"2024-12-18T23:29:57.170Z","updated_at":"2025-04-05T16:44:31.153Z","avatar_url":"https://github.com/JunaidSalim.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Word_Searcher_Using_BST\n\n**Word Search in 2D Array using Binary Search Tree**\n\nBinary Search Tree is a special type of tree that can have atmost 2 children.\n\n**Approach:**\nThis C++ program employs a tree structure to search for words in a dynamically defined 2D array. The `Tree` class is designed to organize the array into a tree, making it easier to search in various directions (horizontal, vertical, diagonal). The program reads words from a file (`words.txt`) and searches for them in the array, outputting results to `output.txt`.\n\n**Intuition:**\n1. **Tree Construction:**\n   - The `read_insert` method constructs a tree from the given 2D array, where each node represents a character. Horizontal and vertical connections are established for efficient traversal.\n  \n2. **Word Search:**\n   - Various search methods (`search_hor`, `search_ver`, etc.) navigate the tree to find words in different directions (horizontal, vertical, diagonal).\n   - Diagonal searches are conducted in both forward and backward directions.\n  \n3. **Output:**\n   - The program outputs the found words along with their coordinates in the `output.txt` file.\n   - The `main` function reads the array, initializes the tree, reads words from `words.txt`, and performs the searches.\n\n**Usage:**\n1. **Input Array:**\n   - Modify the `array` variable in the `main` function to use a different 2D array for searching.\n\n2. **Word List:**\n   - List the words to be searched in the `words.txt` file, with each word on a new line.\n\n3. **Output:**\n   - Run the program and check `output.txt` for the word search results.\n\n**Note:**\n   - Ensure the input array and word list are appropriately formatted for accurate results.\n\n**Execution:**\n   - Compile and run the program. On execution completion, view `output.txt` for the search results.\n\n**Example:**\n   - The provided example searches for words in a crossword-like array, demonstrating the program's flexibility for different 2D structures.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunaidsalim%2Fword_searcher_using_bst","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjunaidsalim%2Fword_searcher_using_bst","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunaidsalim%2Fword_searcher_using_bst/lists"}