oroszgy / radixtree Goto Github PK
View Code? Open in Web Editor NEWFork of the project http://code.google.com/p/radixtree
Home Page: http://code.google.com/p/radixtree
Fork of the project http://code.google.com/p/radixtree
Home Page: http://code.google.com/p/radixtree
A radix tree, Patricia trie/tree, or crit bit tree is a specialized set data structure based on the trie that is used to store a set of strings. In contrast with a regular trie, the edges of a Patricia trie are labelled with sequences of characters rather than with single characters. These can be strings of characters, bit strings such as integers or IP addresses, or generally arbitrary sequences of objects in lexicographical order. Sometimes the names radix tree and crit bit tree are only applied to trees storing integers and Patricia trie is retained for more general inputs, but the structure works the same way in all cases. For more information see http://en.wikipedia.org/wiki/Radix_tree I have created this Radix tree for a project that required fast searching of user name prefixes for a Google AJAX Search like interface. (tahseen.ur.rehman) Radix Tree gives fastest possible ways to search prefixes. For example it can quickly answer queries like "Find all user name starting with 'tahseen'" The database solution for this problem boils down to queries like select * from user where username like 'tahseen%' Database solution does not scale very well if you have a large number of concurrent users searching. A memory based Radix Tree scales very well. -- This implementation of the Radix tree is also capable of finding those values in the tree, which belangs to a key sequence in the tree what are prefixes of a given value.
t.insert("", "sg");
System.out.println(t.contains("")); // prints false
The problem is that, the when you try to find the key "", the root node will match, which is a non real node. (In this tree, you cannot store multiple values for a single key.)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.