Skip to content

Commit e3bc140

Browse files
add test for 208
1 parent 99b00ed commit e3bc140

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package com.fishercoder;
2+
3+
import com.fishercoder.solutions._208;
4+
import org.junit.Test;
5+
6+
import static junit.framework.TestCase.assertEquals;
7+
8+
public class _208Test {
9+
private static _208.Solution1.Trie trie;
10+
11+
@Test
12+
public void test1() {
13+
trie = new _208.Solution1.Trie();
14+
trie.insert("apple");
15+
assertEquals(true, trie.search("apple"));
16+
assertEquals(false, trie.search("app"));
17+
assertEquals(true, trie.startsWith("app"));
18+
trie.insert("app");
19+
assertEquals(true, trie.search("app"));
20+
}
21+
22+
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy