This repository has been archived by the owner on Apr 1, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 307
Create Article : Data-Structures-Trie.md #1064
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
||
The word trie is an inflix of the word "re**trie**val", because the trie can find a single word in a dictionary with only a prefix of the word. | ||
Trie is an efficient data retrieval data structure, using trie, search complexities can be brought to an optimal limit, i.e. length of the string. | ||
It is a multi-way tree structure useful for storing strings over an alphabet. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- It is a multi-way tree structure useful for storing strings over an alphabet.
+ It is a multi-way tree structure, useful for storing strings over an alphabet, when we are storing them.
23 tasks
LGTM 👍 |
LGTM 👍Just add the data structure prefix to the title in the article. |
@alayek @koustuvsinha, please take a look 🎉 |
## What is a trie? | ||
|
||
A trie is a tree like data structure which stores strings, and helps you find the data associated with that string using the prefix of the string. | ||
For example, say you plan on building a dictionary to store strings along with their meanings. You must be wondering why can't I simply use a hash table, to get the information. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reference hash table : the existing article Hash-Tables-and-Hashing Functions.md
For referencing, just add [hash table](the filename)
, no need to give exact paths, it will be picked up relatively.
Just add the reference, otherwise LGTM 👍 |
|
||
A trie is a tree like data structure which stores strings, and helps you find the data associated with that string using the prefix of the string. | ||
For example, say you plan on building a dictionary to store strings along with their meanings. You must be wondering why can't I simply use a hash table, to get the information. | ||
Yes, you obviously can get information using a hash table, but, the [hash tables](Hash-Tables-And-Hashing-Functions.md) can only find data where the string exactly matches the one we've added. But trie will give us the capability to find strings with common prefixes, a missing character etc in lesser time, in comparison to a hash table. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-[hash tables](Hash-Tables-And-Hashing-Functions.md)
+[hash tables](Hash-Tables-And-Hashing-Functions)
🎉 Thanks @ds-249 🎉 |
This pull request was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.