Solved

TreeMap

Posted on 2011-09-07
2
264 Views
Last Modified: 2012-05-12
i would liek to know about TreeMap .

I read TreeMap

 based on the Red-Black tree data structure.


I a=was not clear on that. When, how , where we use it and we implememnt it.

Thanks in advance
0
Comment
Question by:gudii9
2 Comments
 
LVL 47

Accepted Solution

by:
for_yan earned 250 total points
Comment Utility

http://www.jguru.com/faq/view.jsp?EID=981


Answer
A red-black tree is a binary search tree where every node has two children or is a leaf. It ensures O(log N) search times, at a cost of a more complicated insertion (and deletion) process. In a red-black tree, every node is colored either red or black, with a black root node, though a black root node isn't a requirement. In addition, if a node is red, its children must be black and every path from root to leaf (or null child node) must contain the same number of black nodes. These rather obscure rules ensure the tree is balanced.


0
 
LVL 7

Assisted Solution

by:rumi78
rumi78 earned 250 total points
Comment Utility
TreeMap is Map implementation.

You use it when you want to have values ordered by key.

It means, when you iteratate map.values() it will be ordered.

rgds
rumi
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
countX 22 68
IT Company 5 67
micro services vs rest web services 16 45
advertisement module in core php 4 78
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now