- 博客(35)
- 收藏
- 关注
原创 Spring对Controller、Service、Dao进行Junit单元测试
1、在pom.xml中引入测试的Jar包 <dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> <version>${spring.version}</version&
2018-11-15 16:43:57
1051
原创 线性表--80. Remove Duplicates from Sorted Array II
80. Remove Duplicates from Sorted Array IIDescriptionFollow up for “Remove Duplicates”: What if duplicates are allowed at most twice?ExampleFor example, Given sorted array nums = [1,1,1,
2018-01-13 10:26:25
324
原创 线性表--26. Remove Duplicates from Sorted Array
26. Remove Duplicates from Sorted ArrayDescriptionGiven a sorted array, remove the duplicates in-place such that each element appear only once and return the new length.Do not allocate extra spa
2018-01-13 09:31:55
240
原创 算法分析与设计week19--257. Binary Tree Paths
257. Binary Tree PathsDescriptionGiven a binary tree, return all root-to-leaf paths.ExampleFor example, given the following binary tree:1 / \ 2 3 \ 5 All root-to-leaf paths
2018-01-13 08:07:11
277
原创 算法分析与设计week18--112. Path Sum
112. Path SumDescriptionGiven a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.ExampleGiven the bel
2018-01-13 07:54:37
285
原创 算法分析与设计week17--698. Partition to K Equal Sum Subsets
698. Partition to K Equal Sum SubsetsDescriptionGiven an array of integers nums and a positive integer k, find whether it’s possible to divide this array into k non-empty subsets whose sums are al
2018-01-13 07:43:49
235
原创 算法分析与设计week16--121. Best Time to Buy and Sell Stock
121. Best Time to Buy and Sell StockDescriptionSay you have an array for which the ith element is the price of a given stock on day i.If you were only permitted to complete at most one transacti
2018-01-13 07:36:39
197
原创 算法分析与设计week15--198. House Robber
198. House RobberDescriptionYou are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing eac
2018-01-13 07:10:05
353
原创 算法分析与设计week14--70. Climbing Stairs
70. Climbing StairsDescriptionYou are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?
2018-01-13 06:26:29
200
原创 算法分析与设计week13--746. Min Cost Climbing Stairs
746. Min Cost Climbing StairsDescriptionOn a staircase, the i-th step has some non-negative cost cost[i] assigned (0 indexed).Once you pay the cost, you can either climb one or two steps. You ne
2018-01-13 06:14:51
317
原创 算法分析与设计week12--416. Partition Equal Subset Sum
416. Partition Equal Subset SumDescriptionGiven a non-empty array containing only positive integers, find if the array can be partitioned into two subsets such that the sum of elements in both sub
2018-01-13 05:59:03
176
原创 算法分析与设计week11--744. Find Smallest Letter Greater Than Target
744. Find Smallest Letter Greater Than TargetDescriptionGiven a list of sorted characters letters containing only lowercase letters, and given a target letter target, find the smallest element in
2018-01-12 11:27:48
193
原创 算法分析与设计week10--349. Intersection of Two Arrays
349. Intersection of Two ArraysDescriptionGiven two arrays, write a function to compute their intersection.ExampleGiven nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2]. Note: Each element i
2018-01-11 18:56:07
155
原创 算法分析与设计week09--53. Maximum Subarray
53. Maximum SubarrayDescriptionFind the contiguous subarray within an array (containing at least one number) which has the largest sum.ExampleFor example, given the array [-2,1,-3,4,-1,2,1,-
2018-01-11 17:49:40
166
原创 算法分析与设计week08--738. Monotone Increasing Digits
738. Monotone Increasing DigitsDescriptionGiven a non-negative integer N, find the largest number that is less than or equal to N with monotone increasing digits.(Recall that an integer has mo
2018-01-11 15:22:02
159
转载 C++ 排序函数 sort(),qsort()的用法
http://blog.youkuaiyun.com/zzzmmmkkk/article/details/4266888/
2018-01-10 11:24:08
202
原创 南方电网2018校园招聘计算机类岗位面试、笔试经历
先说明一下,南方电网的校园招聘成绩计算是面试(60%)+笔试(40%),其中笔试成绩必须及格。从网申讲起吧,网申每人可选多个单位多个岗位,这个可以参考别人的意见、综合考虑后再做选择。填报顺序不代表志愿顺序,志愿问题会在面试时再具体问到的。到筛选简历阶段,某些供电局会要求拍一段展示视频作为简历筛选参考材料的,内容大概包括:自我介绍,对某供电局的认识,选择某供电局的原因,才艺展示。声音清楚、画
2018-01-09 14:48:49
21621
3
原创 算法分析与设计week07--435. Non-overlapping Intervals
435. Non-overlapping IntervalsDescriptionGiven a collection of intervals, find the minimum number of intervals you need to remove to make the rest of the intervals non-overlapping.Note: 1.You may assu
2017-10-26 07:10:26
235
原创 算法分析与设计week06--452.Minimum Number of Arrows to Burst Balloons
452.Minimum Number of Arrows to Burst BalloonsDescriptionThere are a number of spherical balloons spread in two-dimensional space. For each balloon, provided input is the start and end coordinates of t
2017-10-25 22:03:44
224
原创 算法分析与设计week05--7.Reverse Integer
7.Reverse IntegerDescriptionReverse digits of an integer. Note: The input is assumed to be a 32-bit signed integer. Your function should return 0 when the reversed integer overflows. ExampleExample1:
2017-10-19 10:38:17
201
原创 算法分析与设计week04--45.Jump Game II
45.Jump Game IIDescriptionGiven an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maximum jump length at that
2017-10-19 08:19:09
187
原创 算法分析与设计week04--55.Jump Game
55.Jump GameDescriptionGiven an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maximum jump length at that pos
2017-10-18 21:32:05
208
原创 算法分析与设计week03--455.Assign Cookies
455.Assign CookiesDescriptionAssume you are an awesome parent and want to give your children some cookies. But, you should give each child at most one cookie. Each child i has a greed factor gi, which
2017-10-17 23:56:57
175
原创 算法分析与设计week03--122.Best Time to Buy and Sell Stock II
Leetcode 122.Best Time to Buy and Sell Stock IIDescriptionSay you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You ma
2017-10-17 23:38:06
170
原创 火车购票
问题描述 请实现一个铁路购票系统的简单座位分配算法,来处理一节车厢的座位分配。 假设一节车厢有20排、每一排5个座位。为方便起见,我们用1到100来给所有的座位编号,第一排是1到5号,第二排是6到10号,依次类推,第20排是96到100号。 购票时,一个人可能购一张或多张票,最多不超过5张。如果这几张票可以安排在同一排编号相邻的座位,则应该安排在编号最小的相邻座位。否则应该安排在编
2017-03-12 12:03:10
466
原创 门禁系统
问题描述 涛涛最近要负责图书馆的管理工作,需要记录下每天读者的到访情况。每位读者有一个编号,每条记录用读者的编号来表示。给出读者的来访记录,请问每一条记录中的读者是第几次出现。
2017-03-11 12:23:26
268
原创 图像旋转
问题描述 旋转是图像处理的基本操作,在这个问题中,你需要将一个图像逆时针旋转90度。 计算机中的图像表示可以用一个矩阵来表示,为了旋转一个图像,只需要将对应的矩阵旋转即可。
2017-03-11 12:15:13
232
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人