I implemented the trie ds which can add and search words but i want to know what is the best way to implement searching of:-
search(".ad") -> true
search("b..") -> truehow to manage '.' because now we've to check every possibility for the words and return if there is no word present with same pattern.
Update : Managed to solve with recursion.