|
| 04 Mar 2015 03:58 PM |
Sorry I've been away OT, cool things are happening in San Francisco this week.
Anyways, it's time to exercise your skull organ! For today's challenge, I'm moving away from math and over to programming basics.
Explain the difference between a linked list and an array. For bonus points, give a scenario when you would use a linked list over an array. |
|
|
| Report Abuse |
|
|
|
| 04 Mar 2015 03:59 PM |
"Bonus points"
What do you mean by bonus points? |
|
|
| Report Abuse |
|
|
|
| 04 Mar 2015 04:01 PM |
| eh, figure of speech. I'll give you a high five at RDC. |
|
|
| Report Abuse |
|
|
| |
|
Dreamlike
|
  |
| Joined: 29 Feb 2012 |
| Total Posts: 16147 |
|
| |
|
| |
|
|
| 04 Mar 2015 04:03 PM |
is list random access and array not?
I keep thinking, how can my feet smell if they don't have a nose? |
|
|
| Report Abuse |
|
|
|
| 04 Mar 2015 04:04 PM |
nope, both can be created and stored in the stack.
Keep searching guys. |
|
|
| Report Abuse |
|
|
|
| 04 Mar 2015 04:06 PM |
an array maintains index based system for its elements?
might be java
I keep thinking, how can my feet smell if they don't have a nose? |
|
|
| Report Abuse |
|
|
iiNerdii
|
  |
| Joined: 08 Apr 2011 |
| Total Posts: 5343 |
|
|
| 04 Mar 2015 04:09 PM |
arrays have a determined size
arrays are expensive to add to and delete from
linked list has expansive size and is easy to add and remove from
bwahaha |
|
|
| Report Abuse |
|
|
|
| 04 Mar 2015 04:26 PM |
| Badfitz100 and iiNerdii are both correct! GJ guys. |
|
|
| Report Abuse |
|
|
|
| 04 Mar 2015 04:27 PM |
Can I make your 100th post thread
Buy gold Bye! |
|
|
| Report Abuse |
|
|
Alysus
|
  |
| Joined: 01 Jan 2013 |
| Total Posts: 5893 |
|
|
| 04 Mar 2015 04:28 PM |
It's easier to store data of different sizes in a linked list. An array assumes every element is exactly the same size. As you mentioned, it's easier for a linked list to grow organically. An array's size needs to be known ahead of time, or re-created when it needs to grow. Shuffling a linked list is just a matter of changing what points to what. Shuffling an array is more complicated and/or takes more memory. As long as your iterations all happen in a "foreach" context, you don't lose any performance in iteration.
i dont have any ideas, my rhymes are like onomatopoeias. cus im bo yo, im the greatest rappa ever |
|
|
| Report Abuse |
|
|
|
| 04 Mar 2015 04:29 PM |
@aly
nice stackoverflow reply
I keep thinking, how can my feet smell if they don't have a nose? |
|
|
| Report Abuse |
|
|
twinblock
|
  |
| Joined: 01 Dec 2010 |
| Total Posts: 4790 |
|
|
| 04 Mar 2015 04:30 PM |
ur fat also scratch.mit.edu is ok for beginners my username=csf34854
Snorlax of OT|Add 0 to my post count |
|
|
| Report Abuse |
|
|
|
| 04 Mar 2015 04:30 PM |
scratch is terrible
people go 'lol im serious developer'
when they can make a cat move in scratch
I keep thinking, how can my feet smell if they don't have a nose? |
|
|
| Report Abuse |
|
|
Dreamlike
|
  |
| Joined: 29 Feb 2012 |
| Total Posts: 16147 |
|
|
| 04 Mar 2015 04:32 PM |
"when they can make a cat move in scratch"
it changed alot man |
|
|
| Report Abuse |
|
|
twinblock
|
  |
| Joined: 01 Dec 2010 |
| Total Posts: 4790 |
|
|
| 04 Mar 2015 04:33 PM |
@bad i said for beginners shut ur fat edgy (insert "a" word here) up
Snorlax of OT|Add 0 to my post count |
|
|
| Report Abuse |
|
|
Alysus
|
  |
| Joined: 01 Jan 2013 |
| Total Posts: 5893 |
|
|
| 04 Mar 2015 04:33 PM |
badfitz b quiet nobody likez 2 heer ur bablying mouf!!!111 (jk)
i dont have any ideas, my rhymes are like onomatopoeias. cus im bo yo, im the greatest rappa ever |
|
|
| Report Abuse |
|
|
|
| 04 Mar 2015 04:34 PM |
@twin
are you mad that i learned lua fluently when i was 11 and you can only still use scratch lmao
I keep thinking, how can my feet smell if they don't have a nose? |
|
|
| Report Abuse |
|
|
|
| 04 Mar 2015 08:19 PM |
@iMightBeLying
Congratulations on being a mod! |
|
|
| Report Abuse |
|
|
twinblock
|
  |
| Joined: 01 Dec 2010 |
| Total Posts: 4790 |
|
|
| 05 Mar 2015 05:25 PM |
@bad atleast i dont complain about stupid stuff u nob get a life and stop foruming for 24 hours a day u naruto hed
Snorlax of OT|Add 0 to my post count |
|
|
| Report Abuse |
|
|