Merge Sorted Array
Description: Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array.
You may assume that nums1 has enough space (size that is greater or equal to m + n) to hold additional elements from nums2. The number of elements initialized in nums1 and nums2 are m and n respectively.
Merge Two Sorted Lists
Description: Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.
Example:
Input: 1->2->4, 1->3->4
Output: 1->1->2->3->4->4
Sort List
Description: Sort a linked list in O(n log n) time using constant space complexity.
Insertion Sort List
Description: Sort a linked list using insertion sort.
Merge k Sorted Lists
Description: Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.
Partition List
Description: Given a linked list and a value x, partition it such that all nodes less than x come before nodes
greater than or equal to x. You should preserve the original relative order of the nodes in each
of the two partitions.
For example, Given 1->4->3->2->5->2 and x = 3, return 1->2->2->4->3->5.