摘要:39. Combination Sum 问题描述 Given a set of candidate numbers (C) (without duplicates) and a target number (T), find all unique combinations in C where th
阅读全文
摘要:543. Diameter of Binary Tree 问题描述 Given a binary tree, you need to compute the length of the diameter of the tree. The diameter of a binary tree is th
阅读全文
摘要:538. Convert BST to Greater Tree问题描述Given a Binary Search Tree (BST), convert it to a Greater Tree such that every key of the original BST is...
阅读全文
摘要:226. Invert Binary Tree问题描述Invert a binary tree. 4 / \ 2 7 / \ / \1 3 6 9to 4 / \ 7 2 / \ / \9 6 3 1思路1...
阅读全文
摘要:排序算法总结1. 插入排序vector insertSort(vector nums){ const int n=nums.size(); for(int i=1;i=0;j--) { if(key >= nums[j]) ...
阅读全文