0

What is Difference between linked list or array..?

please reply

10th Sep 2017, 1:38 AM
Shyam Chouhan
Shyam Chouhan - avatar
4 odpowiedzi
0
simple words ..... array.. suppose a 20 datatype holding space....make its place sideby side in your memory in device... not randomly.. if u need 20 places 20 x dataspace have to be used and that total place will be initialised at once... linked list.. is u need 20 datatype space not initialised at once... but initialised only when the code needs it according to ur instruction... they do not consume a leap of memory at once...they can stay in ur device memory randomly... created dynamically... example-------->>>>>>>>>>> 5 houses side by side from ur house is an array... 5 houses of your friends named f1,f2,f3,f4,f5...in different places but u know the address of f1 f1 knows the address of f2 f2 knows the address of f3 ................................................................. f4 knows the address of f5 this is a linked list
10th Sep 2017, 3:49 AM
sayan chandra
sayan chandra - avatar
0
if it is a circular linked list... then f5 knows the address of u as well
10th Sep 2017, 3:51 AM
sayan chandra
sayan chandra - avatar
0
THE THING IS..... the 5 houses side by side dor those u dont need to know the address are actually useless to you.. u have "no work- no need" relation with them but the 5 houses of ur friends are far away.. but u people know all address one by one and u people have "team work-high need" relation this is a informal difference...
10th Sep 2017, 3:58 AM
sayan chandra
sayan chandra - avatar