(String word)
| 64 | |
| 65 | //This function is used to delete the provided word from our Trie |
| 66 | public void delete(String word) { |
| 67 | TrieNode curr= root; |
| 68 | |
| 69 | for(int i=0; i< word.length(); i++) { |
| 70 | char ch= word.charAt(i); |
| 71 | |
| 72 | curr=curr.children[ch -'a']; |
| 73 | } |
| 74 | curr.isEnd= false; |
| 75 | } |
| 76 | } |
| 77 | |
| 78 |