Example #1
0
def test_trie2_insert(trie2: Trie, ):
    assert trie2.search('millennium')
    assert not trie2.search('mill')
    assert trie2.startswith('mill')
    trie2.insert('mill')
    assert trie2.search('mill')
    assert not trie2.search('newspaper')
Example #2
0
def trie2() -> Trie:
    trie2 = Trie()
    trie2.insert('millennium')
    return trie2
Example #3
0
def test_0(trie: Trie, ):
    trie.insert('app')
    assert trie.search('app')
Example #4
0
def test_apple_trie_insert_app_search_app_returns_true(apple_trie: Trie, ):
    apple_trie.insert('app')
    assert apple_trie.search('app')
Example #5
0
def apple_trie(trie: Trie, ) -> Trie:
    trie.insert('apple')
    return trie