We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Since the maximum number of elements is only 1000, you can use a simple trick here,
1) first get all the elements into a LIST and then sort it
2) afterwards you can create a new LInkedList from the sorted list
Merge two sorted linked lists
You are viewing a single comment's thread. Return to all comments →
Since the maximum number of elements is only 1000, you can use a simple trick here, 1) first get all the elements into a LIST and then sort it 2) afterwards you can create a new LInkedList from the sorted list