| Author |
Best Data Structure to solve this problem
|
danial leksevo
Greenhorn
Joined: Jun 25, 2011
Posts: 3
|
posted

0
|
Hi All,
Could you please suggest me which data structure is best to use to solve this problem
I have set of int ranges in the form of two dimensional array e.g int[][] array= {{1- 4},{6-10}{8-20},{20- 30},{50-60}};
I want to combining ranges wherever possible to make a range which cover all of sub-set of the ranges e.g {{6-10}{8-20},{20- 30}}={6-30}
and my final set of ranges will be like array= {{1- 4},{6-30},{50-60}}
for this problem, please suggest me which data structure is the best to use. And any idea how I should combine the ranges.
Thanks in advance!
Best
Danial
|
 |
Darryl Burke
Bartender
Joined: May 03, 2008
Posts: 4163
|
posted

0
|
Double post, locking.
http://www.coderanch.com/t/543084/java/java/Best-Data-Structure-solve#2464240
|
luck, db
There are no new questions, but there may be new answers.
|
 |
 |
|
|
subject: Best Data Structure to solve this problem
|
|
|