What Is Linked List ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 7

What Is Linked List ?

Can we find sum of two linked lists using Stack? 

25th May 2018, 6:55 AM
☆ ⓚⓣ☆
☆ ⓚⓣ☆ - avatar
3 Answers
+ 9
It's a special kind of a data structure often used to build other, more complex data structures: https://www.sololearn.com/learn/634/?ref=app
25th May 2018, 7:01 AM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 1
Link list is dynamic data structure it is similar to array but it is dynamic in nature it updates at run time where as array as static the size of link list isn't fixed it's size changes dynamically at run time
25th May 2018, 12:47 PM
Samar Shaikh
Samar Shaikh - avatar
0
Like arrays, Linked List is a linear data structure. Unlike arrays, linked list elements are not stored at contiguous location; the elements are linked using pointers. Arrays can be used to store linear data of similar types, but arrays have following limitations. 1) The size of the arrays is fixed: So we must know the upper limit on the number of elements in advance. Also, generally, the allocated memory is equal to the upper limit irrespective of the usage. 2) Inserting a new element in an array of elements is expensive, because room has to be created for the new elements and to create room existing elements have to shifted. Linked List advantages over arrays 1) Dynamic size 2) Ease of insertion/deletion In my opinion, it is easier to store the sum into the new linked list than Stack.
25th May 2018, 10:01 PM
Denis
Denis - avatar