Algorithm · Weride · Medium
Design a trie (prefix tree) that stores a collection of words made only of lowercase English letters (a to z). The required methods are: insert(word: str) -> None search(word: str) -> bool startsWith(prefix: str) -> bool I/O Format (Online Judge) Read two lines from standard input: ops — an array of operation names, written in JSON-like notation. args — an array of arguments, written in JSON-like notation. Print one line containing the list of return values for the…
Checking your access…