wu :: forums
« wu :: forums - Which Data Structure to Use »

Welcome, Guest. Please Login or Register.
Nov 25th, 2024, 6:59am

RIDDLES SITE WRITE MATH! Home Home Help Help Search Search Members Members Login Login Register Register
   wu :: forums
   riddles
   cs
(Moderators: Eigenray, Grimbal, william wu, towr, Icarus, ThudnBlunder, SMQ)
   Which Data Structure to Use
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: Which Data Structure to Use  (Read 705 times)
A
Full Member
***



Perder todas as esperanças é liberdade!

   


Gender: male
Posts: 236
Which Data Structure to Use  
« on: Nov 17th, 2007, 9:34pm »
Quote Quote Modify 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: male
Posts: 236
Re: Which Data Structure to Use   problem1-1.JPG
« Reply #1 on: Nov 17th, 2007, 9:42pm »
Quote Quote Modify Modify

1
IP Logged


What Doesn't Kill Me Will Only Make Me Stronger
A
Full Member
***



Perder todas as esperanças é liberdade!

   


Gender: male
Posts: 236
Re: Which Data Structure to Use   problem1-2.JPG
« Reply #2 on: Nov 17th, 2007, 9:43pm »
Quote Quote Modify Modify

2
IP Logged


What Doesn't Kill Me Will Only Make Me Stronger
A
Full Member
***



Perder todas as esperanças é liberdade!

   


Gender: male
Posts: 236
Re: Which Data Structure to Use  
« Reply #3 on: Nov 18th, 2007, 2:00am »
Quote Quote Modify Modify

Undecided Cry 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: male
Posts: 13730
Re: Which Data Structure to Use  
« Reply #4 on: Nov 18th, 2007, 6:55am »
Quote Quote Modify Modify

on Nov 18th, 2007, 2:00am, R0B1N wrote:
Undecided Cry 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: male
Posts: 13730
Re: Which Data Structure to Use  
« Reply #5 on: Nov 18th, 2007, 7:10am »
Quote Quote Modify 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: male
Posts: 236
Re: Which Data Structure to Use  
« Reply #6 on: Nov 18th, 2007, 7:54am »
Quote Quote Modify 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: male
Posts: 13730
Re: Which Data Structure to Use  
« Reply #7 on: Nov 18th, 2007, 9:06am »
Quote Quote Modify 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 Quote Modify 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 ..  Undecided
IP Logged
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »

Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board