摘要:
这里只说vscode这一款IDE的快捷键: windows: ctrl+h mac: command+alt+f 通过上述快捷键唤起IDE界面右上角的查找替换功能对话框。找到正则匹配模式(.*), 输入以下正则: ^\s*(?=\r?$)\n 点relace all小按钮就可以替换掉文件内所有的空行 阅读全文
摘要:
Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as a binary tree in which the dept 阅读全文
摘要:
Given a binary tree, return the postorder traversal of its nodes' values. For example:Given binary tree {1,#,2,3}, return [3,2,1]. Analysis: postorder 阅读全文
摘要:
Given a binary tree, return the inorder traversal of its nodes' values. For example:Given binary tree {1,#,2,3}, return [1,3,2]. Note: Recursive solut 阅读全文
摘要:
Given a binary tree, return the preorder traversal of its nodes' values. For example:Given binary tree {1,#,2,3}, return [1,2,3]. Note: Recursive solu 阅读全文
摘要:
Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shortest path from the root node down to the nearest l 阅读全文
摘要:
Sort a linked list in O(n log n) time using constant space complexity. Analysis: 1. use merge sort 2. use quick sort Java code 20160601 merge sort: 阅读全文
摘要:
Given a list, rotate the list to the right by k places, where k is non-negative. For example:Given 1->2->3->4->5->NULL and k = 2,return 4->5->1->2->3- 阅读全文
摘要:
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 阅读全文