- 博客(7)
- 资源 (1)
- 收藏
- 关注
原创 【LeetCode】31. Next Permutation解法
31. Next PermutationImplement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangement is not possible, it must rearr
2016-03-31 10:44:55 3497 1
原创 【LeetCode】18. 4Sum
【题目】【LeetCode】18. 4SumGiven an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of targe
2016-03-30 21:31:38 439
转载 【LeetCode】3. Longest Substring Without Repeating Characters的两种解法
【题目】3. Longest Substring Without Repeating CharactersGiven a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating l
2016-03-28 20:57:56 548
原创 【LeetCode】.1.Two Sum
1. Two SumGiven an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that each input would have exactly one solution.Exampl
2016-03-28 16:41:41 474
原创 【LeetCode】 242.Valid Anagram 解法及注释
242. Valid AnagramGiven two strings s and t, write a function to determine if t is an anagram of s.For example,s = "anagram", t = "nagaram", return true.s = "rat", t = "car", return fals
2016-03-28 09:53:51 892
转载 【LeetCode】 257.Binary Tree Paths 解法的注解
257. Binary Tree PathsMy SubmissionsQuestionTotal Accepted: 40763 Total Submissions: 146109 Difficulty: EasyGiven a binary tree, return all root-to-leaf paths.For example, gi
2016-03-27 22:57:24 482
转载 关于C++中delete和delete[]的差别
一直对C++中的delete和delete[]的区别不甚了解,今天遇到了,上网查了一下,得出了结论。做个备份,以免丢失。 C++告诉我们在回收用 new 分配的单个对象的内存空间的时候用 delete,回收用 new[] 分配的一组对象的内存空间的时候用 delete[]。关于 new[] 和 delete[],其中又分为两种情况:(1) 为基本数据类型分配和回收空间;(2) 为
2016-03-27 22:19:06 293
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人