Author |
Topic: Which Data Structure to Use (Read 705 times) |
|
A
Full Member
Perder todas as esperanças é liberdade!
Gender:
Posts: 236
|
|
Which Data Structure to Use
« on: Nov 17th, 2007, 9:34pm » |
Quote Modify
|
Am basically looking for data structure which suits the best for the following problem . I Guess i need to look for some kinda hierarchical data structure , am aware of some of the spatial data structures but not able to come up with a design . the plus (+) sign before each of the data indicates that you can expand that particular data .(and - indicates its already expanded ) (check the attachment ) So i need a data structure which will efficiently support all combinations of + and - signs
|
|
IP Logged |
What Doesn't Kill Me Will Only Make Me Stronger
|
|
|
A
Full Member
Perder todas as esperanças é liberdade!
Gender:
Posts: 236
|
1
|
|
IP Logged |
What Doesn't Kill Me Will Only Make Me Stronger
|
|
|
A
Full Member
Perder todas as esperanças é liberdade!
Gender:
Posts: 236
|
2
|
|
IP Logged |
What Doesn't Kill Me Will Only Make Me Stronger
|
|
|
A
Full Member
Perder todas as esperanças é liberdade!
Gender:
Posts: 236
|
|
Re: Which Data Structure to Use
« Reply #3 on: Nov 18th, 2007, 2:00am » |
Quote Modify
|
no one going for it ?
|
|
IP Logged |
What Doesn't Kill Me Will Only Make Me Stronger
|
|
|
towr
wu::riddles Moderator Uberpuzzler
Some people are average, some are just mean.
Gender:
Posts: 13730
|
|
Re: Which Data Structure to Use
« Reply #4 on: Nov 18th, 2007, 6:55am » |
Quote Modify
|
on Nov 18th, 2007, 2:00am, R0B1N wrote: no one going for it ? |
| Don't be so impatient; it's the weekend. I hadn't even seen it yet, let alone have a chance to decide whether or not to "go for it".
|
|
IP Logged |
Wikipedia, Google, Mathworld, Integer sequence DB
|
|
|
towr
wu::riddles Moderator Uberpuzzler
Some people are average, some are just mean.
Gender:
Posts: 13730
|
|
Re: Which Data Structure to Use
« Reply #5 on: Nov 18th, 2007, 7:10am » |
Quote Modify
|
I would use trees of classes. For example you'd have a company-object, which can contain any number of product-objects.
|
|
IP Logged |
Wikipedia, Google, Mathworld, Integer sequence DB
|
|
|
A
Full Member
Perder todas as esperanças é liberdade!
Gender:
Posts: 236
|
|
Re: Which Data Structure to Use
« Reply #6 on: Nov 18th, 2007, 7:54am » |
Quote Modify
|
BTW , here the number of columns,rows might very , its not necessarily 2 always . . .
|
|
IP Logged |
What Doesn't Kill Me Will Only Make Me Stronger
|
|
|
towr
wu::riddles Moderator Uberpuzzler
Some people are average, some are just mean.
Gender:
Posts: 13730
|
|
Re: Which Data Structure to Use
« Reply #7 on: Nov 18th, 2007, 9:06am » |
Quote Modify
|
Have you considered a relational database? What do you need to use this for, anyway? That's a rather important question that needs answering. How much data will you deal with?
|
|
IP Logged |
Wikipedia, Google, Mathworld, Integer sequence DB
|
|
|
wanderer
Newbie
Posts: 34
|
|
Re: Which Data Structure to Use
« Reply #8 on: Nov 18th, 2007, 2:09pm » |
Quote Modify
|
on Nov 18th, 2007, 7:54am, R0B1N wrote:BTW , here the number of columns,rows might very , its not necessarily 2 always . . . |
| you might want not to lomit the number of children of a node in the tree by having the children of any node as a linked list to which any number of children can be added / deleted.. this does take its toll on time complexity though ..
|
|
IP Logged |
|
|
|
|