摘要:
Question: Sort a linked list in O(n log n) time using constant space complexity. Tips:给一个单链表按照val进行排序。 思路:题目要求时间复杂度为nlog(n) 这是归并排序的时间复杂度,即采用分治的方法进行排序。 阅读全文
摘要:
You are given two non-empty linked lists representing two non-negative integers. The most significant digit comes first and each of their nodes contai 阅读全文