PythiloHard · 40 min · Task 97 of 100 · progress kept in this browser

Find dictionary words on a board

Return sorted distinct nonempty dictionary words formed by moving horizontally or vertically on a rectangular character board. A cell cannot repeat within one word. Empty board returns [].

trie = {'a': {'b': {'': 'ab'}}}
node = trie['a']['b']
print(node[''])
Your task

Return sorted distinct nonempty dictionary words formed by moving horizontally or vertically on a rectangular character board. A cell cannot repeat within one word. Empty board returns [].