7 Replies - 3791 Views - Last Post: 08 May 2011 - 04:11 PM

Topic Sponsor:

#1 KYA  Icon User is offline

  • #include <beer.h>
  • member icon

Reputation: 2544
  • View blog
  • Posts: 18,732
  • Joined: 14-September 07

Computer Science: Data Structure Challenge

Post icon  Posted 07 May 2011 - 07:54 PM

We've had language specific challenges for a while now, here's a Computer Science one.

Come up with a data structure that gets more memory efficient as more stuff is put into it.

i.e. if you put in 5 items and it's 80 bytes per item [on average], 10 items in the structure would have a lower average [say 60, it doesn't necessarily have to half the average].

Now, this is theoretical, but implementing it in a language *cough* C/C++ * cough* is highly encouraged.


Hint 1:

Spoiler


Hint 2:

Spoiler


Hint 3:

Spoiler


Is This A Good Question/Topic? 2
  • +

Replies To: Computer Science: Data Structure Challenge

#2 NeoTifa  Icon User is offline

  • ¿Dónde están mis pantalones?
  • member icon


Reputation: 1402
  • View blog
  • Posts: 13,836
  • Joined: 24-September 08

Re: Computer Science: Data Structure Challenge

Posted 07 May 2011 - 08:06 PM

B-Trees?
Was This Post Helpful? 0
  • +
  • -

#3 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon


Reputation: 7497
  • View blog
  • Posts: 28,838
  • Joined: 27-December 08

Re: Computer Science: Data Structure Challenge

Posted 07 May 2011 - 09:47 PM

Here are my thoughts on this problem:

Spoiler

Was This Post Helpful? 2
  • +
  • -

#4 KYA  Icon User is offline

  • #include <beer.h>
  • member icon

Reputation: 2544
  • View blog
  • Posts: 18,732
  • Joined: 14-September 07

Re: Computer Science: Data Structure Challenge

Posted 08 May 2011 - 08:52 AM

Exactly.

Spoiler

Was This Post Helpful? 3
  • +
  • -

#5 ishkabible  Icon User is offline

  • spelling expert
  • member icon



Reputation: 1128
  • View blog
  • Posts: 4,747
  • Joined: 03-August 09

Re: Computer Science: Data Structure Challenge

Posted 08 May 2011 - 11:23 AM

i couldn't think of anything very creative, i just made a queue that handles redundant objects differently. it might be useful for storing large highly redundant objects however. maybe extremely large Big Nums with highly redundant values.

Spoiler


edit: oops i forgot to add spoiler tags...

This post has been edited by ishkabible: 08 May 2011 - 11:38 AM

Was This Post Helpful? 0
  • +
  • -

#6 diego_pmc  Icon User is offline

  • D.I.C Addict

Reputation: 81
  • View blog
  • Posts: 565
  • Joined: 13-May 09

Re: Computer Science: Data Structure Challenge

Posted 08 May 2011 - 12:16 PM

I have a question, not an answer. :D

Spoiler

This post has been edited by diego_pmc: 08 May 2011 - 12:17 PM

Was This Post Helpful? 0
  • +
  • -

#7 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon


Reputation: 7497
  • View blog
  • Posts: 28,838
  • Joined: 27-December 08

Re: Computer Science: Data Structure Challenge

Posted 08 May 2011 - 12:18 PM

Hope this helps some. :)
Spoiler

Was This Post Helpful? 0
  • +
  • -

#8 AdamSpeight2008  Icon User is offline

  • Coder-ian
  • member icon

Reputation: 1399
  • View blog
  • Posts: 7,349
  • Joined: 29-May 08

Re: Computer Science: Data Structure Challenge

Posted 08 May 2011 - 04:11 PM

KYA you don't mention anything about;-
if you have to preserve to ordering?
if the same value is allow multiple times?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1