Exemplo n.º 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')
Exemplo n.º 2
0
def test_apple_trie_insert_app_search_app_returns_true(apple_trie: Trie, ):
    apple_trie.insert('app')
    assert apple_trie.search('app')
Exemplo n.º 3
0
def test_apple_trie_search_apple_returns_true(apple_trie: Trie, ):
    assert apple_trie.search('apple')
Exemplo n.º 4
0
def test_apple_trie_search_app_returns_false(apple_trie: Trie, ):
    assert not apple_trie.search('app')
Exemplo n.º 5
0
def test_0(trie: Trie, ):
    trie.insert('app')
    assert trie.search('app')