The only people who have anything to fear from free software are those whose products are worth even less. David Emery

Longest prefix matching

Language Java | Level Intermediate | Category Data structure | September 9, 2015 8:35 am


Data structure Description

Longest prefix match refers to an algorithm used by routers in Internet Protocol (IP) networking to select an entry from forwarding table.

Write a program to implement longest prefix match using trie?


Output

   					 

All the strings from arrays: [are, area, base, cat, cater, basement]

Search Matching prefix 'caterer' from given words: cater
Search Matching prefix 'basement' from given words: basement
Search Matching prefix 'arex' from given words: are
Search Matching prefix 'basemexz' from given words: base

				    

Comments


No comments available!

Please login to add comments.