๐Ÿ“ฆ schubart / LeetCode

๐Ÿ“„ lc_0208_test.py ยท 14 lines
1
2
3
4
5
6
7
8
9
10
11
12
13
14from lc_0208 import Trie


def test_example():
    trie = Trie()

    trie.insert("apple")
    assert trie.search("apple")
    assert not trie.search("app")
    assert trie.startsWith("app")

    trie.insert("app")
    assert trie.search("app")