I was reading about sorted linked lists and unsorted sorted lists ... I found this table http://bigocheatsheet.com/
I do not understand what they mean by saying in the third table that a sorted linked list has Merge of O(m+n) while an unsorted sorted list has Merge of O(1)!
What does that mean?
thanks
O(m+n)for the sorted lists is because you need to place the elements into the correct positions when merging sorted lists. In an unsorted list you don't really care where it is in the list so you can add each element of one list to the start (or any arbitrary position) of the second list.