自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Practice when no one is watching...

吃饭,睡觉,练级中

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

原创 LeetCode 135 Candy

题目根据数组权重分配糖果,每个位子至少一个,比旁边高,糖就要多代码

2015-04-21 22:43:13 508

原创 LeetCode 134 Gas Station

题目加油站,从哪个点可以跑一圈代码p

2015-04-21 14:05:02 415

原创 LeetCode 133 Clone Graph

题目复制无向图代码publi

2015-04-21 10:52:49 403

原创 LeetCode 131 Palindrome Partitioning

题目字符串分割为回文代码pu

2015-04-20 23:18:16 362

原创 LeetCode 130 Surrounded Regions

题目五子棋棋盘,被围的'O‘全部变成’X‘代码

2015-04-20 15:16:58 442

原创 LeetCode 126 Word Ladder II

题目给出两个字符串和一个字典,写出两个字符串通过这个字典的变化步骤代码

2015-04-19 23:30:50 384

原创 LeetCode 127 Word Ladder

题目给出两个字符串和一个字典,判断两个字符串通过这个字典,需要多少步骤.代码1

2015-04-18 23:48:16 464

原创 LeetCode 125 Valid Palindrome

题目判断是否回文代码public class Sol

2015-04-15 10:42:37 330

原创 LeetCode 099 Recover Binary Search Tree

题目恢复BST,有两个点交换了。代码public c

2015-04-11 00:19:00 400

原创 LeetCode 098 Validate Binary Search Tree

题目验证BST代码1 public boolean

2015-04-10 23:11:00 363

原创 LeetCode 097 Interleaving String

题目两个字符串可以拼接成一个否?思考1 可以用dp来

2015-04-10 16:46:12 603

原创 LeetCode 080 Remove Duplicates from Sorted ArrayII

题目重复的可以出现最多两次代码public class Solution { public int remo

2015-04-06 22:40:40 369

原创 LeetCode 071 Simplify Path

题目按照linux的方式简化 路径字符串代码public class

2015-04-02 16:42:07 467

原创 LeetCode 057 Insert Interval

题目插入区间代码

2015-03-29 11:43:52 387

原创 LeetCode 056 Merge Intervals

题目合并区间代码

2015-03-29 10:53:25 374

原创 LeetCode 044 Wildcard Matching

题目字符串匹配 “." 匹配任意字符串  “?”匹配单个字符串代码

2015-03-26 22:32:34 362

原创 LeetCode 045 Jump Game II

题目Given an array of non-negative integers, you are initially positioned at the first index

2015-03-26 22:24:40 366

原创 LeetCode 043 Multiply Strings

题目字符串相乘,乘数位正,可以任意大。代码

2015-03-26 16:23:28 378

原创 LeetCode 031 Next Permutation

题目数组,按照递增,求下一组数组序列代码public class Solution { public void nextPermutation(int[

2015-03-25 15:47:09 341

原创 LeetCode 040 Combination SumII

题目给一个set 和 一个target 。set中元素只能用一次,加起来得到target的集合。代码

2015-03-24 22:31:56 370

原创 LeetCode 039 Combination Sum

题目给一个set 和 一个target 。set中元素可以任意数量,加起来得到target的集合。代码publi

2015-03-24 22:16:29 314

原创 LeetCode 032 Longest Valid Parentheses

题目字符串中找最长合法括号子串代码publi

2015-03-23 23:14:57 280

原创 LeetCode 028 Implement strStr()

题目字符串中找子串。返回第一个index。不用考虑效率。代码

2015-03-20 21:25:42 271

原创 LeetCode 005 Longest Palindromic Substring

题目字符串中最长回文子串代码public class Solution { public String longestPalindrome(String s) { if(s ==

2015-03-19 23:23:56 293

原创 LeetCode 008 String to Integer (atoi)

题目完成atoi 的函数。特别要考虑corner。代码public class Solution { public int atoi(String str) { if(st

2015-03-19 15:00:50 411

原创 LeetCode 023 Merge k Sorted Lists

题目把k个排序号的链表连接成一个有序链表。代码public class Solution { public ListNode mergeKLists(List lists) { i

2015-03-19 14:21:39 338

原创 LeetCode 017 Letter Combinations of a Phone Number

题目字符串按照zigzag排列,最后按照行输出结果。代码 public static List letterCombinations(String digits) { Li

2015-03-18 12:36:26 346

原创 LeetCode 006 ZigZag Conversion

题目字符串按照zigzag排列,最后按照行输出结果。代码public class Solution { public String convert(String s, int nRow

2015-03-16 15:33:26 305

原创 LeetCode 002 Add Two Numbers

题目两个数,每位都按照链表倒序存储。求和,存入新的链表中。代码public class Solution { public ListNode addTwoNumbers(ListNode l1, ListNode l2) { ListNode

2015-03-15 10:17:13 332

原创 JAVA 与 Python 变量赋值的不同

具体例子如下:JAVAint l2Val = 0;int l1Val = 0;Pythonv1 = v2 = 0直观的感觉:Python 比 Java 简洁多了。原因:1 JAVA强类型,每个新变量都要定义属性;2 JAVA虽然可以连写,但是新定义属性的变量不能写在当中;3 Python 不需要定义属性,且可以连写。

2015-03-15 10:02:07 919

转载 编程之美--2.11 寻找最近点对

[cpp] view plaincopy/* 对于这类题目,首先要对进行划分区域,要划分区域就要按照X坐标进行排序,然后进行划分,当划分到只有两个点或者三个点时,在进行求点之间的距离,并记录! 接下来进来区域之间的合并,当当前的点到刚才以这个划分区域为准的中线距离大于刚才我们所求的距离时,则放弃,否则进行更新最短距离! 总体算法思想就是利用递归最后进行合

2014-10-13 15:03:20 766

原创 阿网面试43

1 问了我主要z2

2014-09-11 13:06:52 407

原创 LeetCode 086 Partition List

题目Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x.

2014-09-02 08:09:41 497

原创 编程之美--2.7 最大公约数问题

解答1 根据书上的理解,有三种方式:辗转相除法,辗转想

2014-09-02 07:34:34 521

原创 编程之美--2.6 精确表达浮点数

解答1 关于阶梯2 代码

2014-09-01 22:04:19 486

原创 LeetCode 120 Triangle

Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the following triangle[ [2], [3,4], [

2014-08-19 15:22:30 459

原创 LeetCode 038 Count and Say

题目Given n, generate all structurally unique BST's (binary search trees) that store values 1...n.For example,Given n = 3, your program sh

2014-08-19 08:52:53 606

原创 LeetCode 109 Convert Sorted List to Binary Search Tree

题目Write a function to find the longest common prefix string amongst an array of strings.

2014-08-18 12:28:56 680

原创 LeetCode 034 Search for a Range

题目Given a sorted array of integers, find the starting and ending position of a given target value.Your a

2014-08-18 11:39:52 416

原创 LeetCode 014 Longest Common Prefix

题目思路11 一开始考虑,从头

2014-08-17 12:07:19 498

空空如也

空空如也

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

TA关注的人

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