user2758935
user2758935

Reputation: 141

Best tree type for Dictionary implementation

I am required to implement general dictionary using Java that will allow efficient O(logN) or better insertions, deletions and random access.

My question is: what type of tree will give me the best time performance for a huge amount of insertions and deletions? AVL, RB, Binary Search, Splay or B-Trees?

Upvotes: 1

Views: 842

Answers (1)

nikhil jain
nikhil jain

Reputation: 105

You can use trie data structure for implementing dictionary.For implementing it first you have to create trie which will take O(nlogn) time.After that you can search,insert & delete word in O(logn). For more understanding you can refer NPTEL LINK,which contain basic of tire data structure.

Upvotes: 1

Related Questions