ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have to implement a trie and I don't know how to search an element there. I have to reach to say the 4th character and I don't know how to do that. I've googled enugh but i don't seem to find anything relevant. Thank you!
Things to include in your post that would be helpfull.
1. programming language.
2. what is a trie ? you might mean tree
3. is this homework? if so looking in your text book might be of help.
4. is this a binary tree? if so searching though one is quite extensive.
Sorry not famillar with this type of data structure. thats why I dident know what trie was. Sorry for the mix up thought you were doing a spelling foobar.
search(a,k);
search the trie a for the element number k
and the trie contains only numbers and the order is considered the lexicografic order not the sort one.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.