hi
what is the differences in the c shapr LinkedList and SortedList..
and where these are useful...which one is the best
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Kirtan PatelPosted Dec 24, 2009, 7:16 AM
Here i m giving you breif clarification aout both Linked List and the SortedList
if my answer helps you then please check "Do you like this answer" check box :)
Difference
------------
LinkList and Sorted List Both are Class of Collections in C#
Linked List is List of Nodes .. they are connected to it other by address of one another .
While Sorted List is Implemented Using IDictionary means
it contain KeyPairs
for access elements in Linked List you need to Access Elements in Sequence One by One to Get the value .while you have
pairs like key and its Value better to use Sorted List as it will be fast to search value as its Already Sorted .by keys .
Which one is Best . ??
the answer is it depends on the Situation of program every collection have its own advantage so we can not say which one is best it depends on the situation linked list node can be stored in any position of memory while sorted list can use whole block of memory .. again this is not the disadvantage of Sorted List.