2014年4月15日

Climbing Stairs-LeetCode

摘要: You are climbing a stair case. It takesnsteps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb... 阅读全文

posted @ 2014-04-15 04:36 iisahu 阅读(113) 评论(0) 推荐(0) 编辑

Single Number II

摘要: Given an array of integers, every element appearsthreetimes except for one. Find that single one.Note:Your algorithm should have a linear runtime comp... 阅读全文

posted @ 2014-04-15 04:31 iisahu 阅读(89) 评论(0) 推荐(0) 编辑

Roman to Integer - LeetCode

摘要: Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.首先要知道罗马数字的规律。 罗马数字对应阿拉伯数字有两种情况:1.用两个字符来表示一个数... 阅读全文

posted @ 2014-04-15 03:57 iisahu 阅读(119) 评论(0) 推荐(0) 编辑

Remove Duplicates from Sorted List -LeetCode

摘要: Given a sorted linked list, delete all duplicates such that each element appear onlyonce.For example,Given1->1->2, return1->2.Given1->1->2->3->3, retu... 阅读全文

posted @ 2014-04-15 02:56 iisahu 阅读(110) 评论(0) 推荐(0) 编辑

Search Insert Position - LeetCode

摘要: 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 or... 阅读全文

posted @ 2014-04-15 02:47 iisahu 阅读(129) 评论(0) 推荐(0) 编辑

导航