摘要:
Sort a linked list in O(n log n) time using constant space complexity. Example 1: Example 2: 题目大意: 对链表进行排序 解法; 使用之前插排思想解决,待优化,效率较低。这里newHead的next为啥不用等 阅读全文
摘要:
Sort a linked list using insertion sort. A graphical example of insertion sort. The partial sorted list (black) initially contains only the first elem 阅读全文
摘要:
Given an input string, reverse the string word by word. Example 1: Example 2: Example 3: Note: A word is defined as a sequence of non-space characters 阅读全文
摘要:
Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are +, -, *, /. Each operand may be an integer or another e 阅读全文