自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Coffee coder

学习,学以致用~Coffee in,Code out

  • 博客(4)
  • 收藏
  • 关注

原创 leetcode005:Add 2 numbers

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 an

2012-12-11 23:12:06 800

原创 leetcode004:add binary

莫非深夜真的coder最有灵感的时候? 题目: /** * Given two binary strings, return their sum (also a binary string). * For example, * a = "11" * b = "1" * Return "100". * */思路: 1.当字符串有一个为空或者为0时,相当于答案取决于另一个

2012-12-07 00:43:45 620

原创 leetcode003:4 sum

嗯嗯,这次是4sum题了。 4Sum Given 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 s

2012-12-03 23:51:55 496

原创 leetcode002:3sum closest

我去,时隔好几天才真的来解决第二个问题,太懒了,没怎么去思考。还是参考了下网上其他人的做法,才知道自己想的太复杂了,在判断指针左右移的时候纠结了。但其实算法跟第一题大致相同的,同样的思路解决o^2问题,再者就是如何去判断是否靠近了,这部分需要注意的应该就是判断的是绝对值而不是单纯相减.public class Solution { public int threeSumClosest(in

2012-12-02 20:30:52 706

空空如也

空空如也

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

TA关注的人

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