Problem Challenge: Search Similar Words

Solve a problem to test and practice your knowledge and understanding of search engine and tries.

Problem statement

Strings that differ in only one letter are one-character-away strings. For example, kit and kat differ only in the second position. You're given a list of unique words present in the datastore and an array of string queries. Return the count of one-character-away strings present in the datastore for all the string queries.

Example

Sample input

Get hands-on with 1200+ tech skills courses.