[algogeeks] Re: Data Structure for URL matching

2010-08-19 Thread Chi
Hi Amit, are you some sort of a genius or what do I expect now!? Can you answer my question? Best regards, On Aug 17, 12:24 am, Amit Jaspal amitjaspal...@gmail.com wrote: http://www.ahhf45.com/info/Data_Structures_and_Algorithms/resources/t... Refer this link. On Mon, Aug 16, 2010 at

Re: [algogeeks] Re: Data Structure for URL matching

2010-08-17 Thread Amit Jaspal
http://www.ahhf45.com/info/Data_Structures_and_Algorithms/resources/technical_artile/ternary_search_tree/terstree.htm Refer this link. On Mon, Aug 16, 2010 at 10:29 PM, Chi c...@linuxdna.com wrote: I'm not sure what you want. I have post a solution to search for wildcards in tries. Now you

[algogeeks] Re: Data Structure for URL matching

2010-08-17 Thread Chi
Hi Amit, it is not proven that a ternary-search-tree is faster: http://nicolas.lehuen.com/category/pytst/ From the article: The difference between pytst and ctst This gives 11 nodes for 7 strings. I won’t waste time to draw the ternary search tree equivalent, so you’ll have to trust me, but

[algogeeks] Re: Data Structure for URL matching

2010-08-16 Thread Chi
I'm not sure what you want. I have post a solution to search for wildcards in tries. Now you claim to do it better with TS-Trees. Do you know who to compute a reverse TS-Tree? And why don't you try first to code a radix-tree, which is a compressed trie and build then the reverse radix-tree? Here

[algogeeks] Re: Data Structure for URL matching

2010-08-15 Thread Chi
What you may need is a reverse trie. You may take a look at this: http://phpir.com/tries-and-wildcards On Aug 15, 3:21 pm, amit amitjaspal...@gmail.com wrote: In our indexes, we have millions of URLs each of which has a link to some page contents, that is, URL-contents. Now, suppose a user

[algogeeks] Re: Data Structure for URL matching

2010-08-15 Thread Chi
What you need is a reverse trie dictionary. You may take a look at this: http://phpir.com/tries-and-wildcards On Aug 15, 3:21 pm, amit amitjaspal...@gmail.com wrote: In our indexes, we have millions of URLs each of which has a link to some page contents, that is, URL-contents. Now, suppose a

Re: [algogeeks] Re: Data Structure for URL matching

2010-08-15 Thread Amit Jaspal
Seems a gud idea . I have read we can do better with Ternary Search Trees .Can anybody has any idea about it? On Sun, Aug 15, 2010 at 11:44 PM, Chi c...@linuxdna.com wrote: What you may need is a reverse trie. You may take a look at this: http://phpir.com/tries-and-wildcards On Aug 15,