自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(5)
  • 收藏
  • 关注

原创 2.Add Two Numbers

You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a link

2016-08-31 23:07:43 163

原创 1.two sum

Given an array of integers, return indices of the two numbers such that they add up to a specific target.time:o(n) space:o(n)最初做法用2个循环,但是用一个循环会节省一点时间,虽然时间复杂度一样。 public int[] twoSum(int[] n

2016-08-31 23:06:19 179

原创 5.Longest Palindromic Substring

Given a string S, find the longest palindromic substring inS. You may assume that the maximum length of S is 1000, and there exists one unique longest palindromic substring.循环遍历:回文字符串有2种可能,一种是abba

2016-08-31 21:27:36 180

原创 4.Median of Two Sorted Arrays

最简单的解决方法:time: o(m+n)space: o(m+n)实现代码: public double findMedianSortedArrays(int[] nums1, int[] nums2) { int len1=nums1.length; int len2=nums2.length; int[] nums=ne

2016-08-31 20:17:56 157

原创 3.Longest Substring Without Repeating Characters

Given a string, find the length of the longest substring without repeating characters.最简单的解决方式,逐渐遍历time o(n^2) space o(n^2) public int lengthOfLongestSubstring(String s) {        int len=s.l

2016-08-31 13:38:58 174

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除