C语言
文章平均质量分 54
T-Rainbow
欢迎来到“菜鸟”驿站!
展开
-
欢迎使用CSDN-markdown编辑器
欢迎使用Markdown编辑器写博客本Markdown编辑器使用StackEdit修改而来,用它写博客,将会带来全新的体验哦:Markdown和扩展Markdown简洁的语法代码块高亮图片链接和图片上传LaTex数学公式UML序列图和流程图离线写博客导入导出Markdown文件丰富的快捷键快捷键加粗 Ctrl + B 斜体 Ctrl + I 引用 Ctrl原创 2017-03-12 17:12:43 · 199 阅读 · 0 评论 -
第七周作业1(LeetCode9)
1. 问题描述(LeetCode9)Determine whether an integer is a palindrome. Do this without extra space.2. 解决思路这道题如果没有对空间的使用进行限制的话,是一道用数组可以很快就解决的题目。正是要求了不能使用额外的空间,则稍微加大了这道题的难度。不过采取逐位比较判断的方法也可以很好的解决这个问题,而这一方法的关键在于在原创 2017-04-13 18:45:10 · 436 阅读 · 0 评论 -
第五周作业2(LeetCode76)
1. 题目描述Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).For example, S = “ADOBECODEBANC” T = “ABC”Minimum window is “BANC”.N原创 2017-03-27 11:12:31 · 222 阅读 · 0 评论 -
第四周作业2(LeetCode442)
1. 题目描述Given an array of integers, 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once.Find all the elements that appear twice in this array.Could you do it without extr原创 2017-03-20 11:26:14 · 232 阅读 · 0 评论 -
第四周作业1(LeetCode287)
1. 题目描述Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least one duplicate number must exist. Assume that there is only one duplicate numb原创 2017-03-19 14:50:56 · 237 阅读 · 0 评论 -
第三周作业1(LeetCode53)
1. 题目描述Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array [-2,1,-3,4,-1,2,1,-5,4], the contiguous subarray [4,-1,2,1]原创 2017-03-12 21:45:01 · 162 阅读 · 0 评论 -
第三周作业2(LeetCode75)
1. 题目描述Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, white and blue.Here, we will use the integer原创 2017-03-12 21:25:09 · 201 阅读 · 0 评论 -
第二周作业2(LeetCode42)
1. 题目描述Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.For example, Given [0,1,0,2,1,0,1,3,2,1,2,原创 2017-03-04 13:29:53 · 264 阅读 · 0 评论 -
第一周作业2(LeetCode15)
1. 题目描述Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.Note: The solution set must not contain原创 2017-03-04 00:32:13 · 262 阅读 · 0 评论 -
第二周作业1(LeetCode27)
题目描述Given an array and a value, remove all instances of that value in place and return the new length. Do not allocate extra space for another array, you must do this in place with constant memory. T原创 2017-03-04 10:50:28 · 263 阅读 · 0 评论