- 博客(9)
- 资源 (3)
- 收藏
- 关注
原创 第一个SpringBoot。
import org.springframework.web.bind.annotation.RestController;import org.springframework.web.bind.annotation.RequestMapping;import org.springframework.web.bind.annotation.RequestMethod;@RestContro...
2018-05-14 22:04:26 182
原创 LeetCode 35. Search Insert Position Java
Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.You may assume no duplicates in the array.Exam...
2018-05-14 13:06:11 234
原创 Leetcode 34. Search for a Range Java
Given an array of integers nums sorted in ascending order, find the starting and ending position of a given target value.Your algorithm's runtime complexity must be in the order of O(log n).If the tar...
2018-05-13 16:52:51 242
原创 LeetCode 152. Maximum Product Subarray Java
求最大连续子序列乘积! public int maxProduct(int[] nums) { int len=nums.length; int dp1[]=new int[len]; int dp2[]=new int[len]; dp1[0]=nums[0]; dp2[0]=nums[0]; for...
2018-05-13 16:20:33 192
原创 LeetCode 33. Search in Rotated Sorted Array
Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.(i.e., [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,2]).You are given a target value to search. If found in t...
2018-05-08 23:28:24 116
原创 LeetCode 31. Next Permutation
Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangement is not possible, it must rearrange it as the lowest possible ord...
2018-05-08 20:27:48 103
原创 LeetCode 29 Divide Two Integers
Given two integers dividend and divisor, divide two integers without using multiplication, division and mod operator.Return the quotient after dividing dividend by divisor.The integer division should ...
2018-05-08 18:40:58 118
原创 LeetCode27 Remove Element
Given an array nums and a value val, 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 by modifying the input array ...
2018-05-08 18:30:43 203
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人