Skip to content

Commit 841f69f

Browse files
authored
Update README.md
1 parent 84fbaee commit 841f69f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dataStructures/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Application of Heap:
3434
`Trie` is a tree like data structure that is used to efficiently find a word or prefix in collection of words. In a Trie, each node in the tree represents a single character in a string. The root node represents the empty string, and the edges between nodes represent the cahracters that make up the string. Each node may have multiple children, representing the different possible characters that can follow the character represented by the node. The easiest possible implementation is below:
3535
```kotlin
3636
class TrieNode {
37-
val children = mutableMapOf<Char, TrieNode>()
37+
val children = mutableMapOf<Char, TrieNode>() // Also Array of letters can be used there but simple implementation is limited to lower/upper case letters.
3838
var isEndOfWord = false
3939
}
4040

0 commit comments

Comments
 (0)