2014年9月16日

[leetcode] Add Binary @Python

摘要: 题目:https://oj.leetcode.com/problems/add-binary/Given two binary strings, return their sum (also a binary string).For example,a = "11"b = "1"Return "10... 阅读全文

posted @ 2014-09-16 09:32 AIDasr 阅读(934) 评论(0) 推荐(0) 编辑

[leetcode] Valid Palindrome @ Python

摘要: 原题地址:https://oj.leetcode.com/problems/valid-palindrome/题意:Given a string, determine if it is a palindrome, considering only alphanumeric characters an... 阅读全文

posted @ 2014-09-16 07:09 AIDasr 阅读(619) 评论(0) 推荐(0) 编辑

[leetcode] LRU Cache @ Python

摘要: Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations:getandset.get(key)- Get the valu... 阅读全文

posted @ 2014-09-16 02:50 AIDasr 阅读(820) 评论(0) 推荐(0) 编辑

2014年9月15日

[leetcode]Swap Nodes in Pairs @ Python

摘要: 原题地址:http://oj.leetcode.com/problems/swap-nodes-in-pairs/Given a linked list, swap every two adjacent nodes and return its head.For example,Given 1->2... 阅读全文

posted @ 2014-09-15 06:04 AIDasr 阅读(1918) 评论(1) 推荐(1) 编辑

2014年9月14日

[LeetCode] Reverse Linked List II @ Python [提供自创的示意图 Figure illustration]

摘要: 原题地址:https://oj.leetcode.com/problems/reverse-linked-list-ii/题意:Reverse a linked list from positionmton. Do it in-place and in one-pass.For example:Gi... 阅读全文

posted @ 2014-09-14 23:04 AIDasr 阅读(909) 评论(0) 推荐(0) 编辑

[leetcode]Add Two Numbers @ Python

摘要: 原题地址:https://oj.leetcode.com/problems/add-two-numbers/题意:You are given two linked lists representing two non-negative numbers. The digits are stored i... 阅读全文

posted @ 2014-09-14 21:57 AIDasr 阅读(1476) 评论(0) 推荐(0) 编辑

[leetcode]Rotate Image, Matrix tranposition, matrix rotation 90 degree @ Python

摘要: 原题地址:https://oj.leetcode.com/problems/rotate-image/题意:You are given annxn2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Fo... 阅读全文

posted @ 2014-09-14 11:17 AIDasr 阅读(1421) 评论(0) 推荐(0) 编辑

[leetcode]Candy @ Python

摘要: 原题地址:https://oj.leetcode.com/problems/candy/题意:There areNchildren standing in a line. Each child is assigned a rating value.You are giving candies to ... 阅读全文

posted @ 2014-09-14 11:06 AIDasr 阅读(105) 评论(0) 推荐(0) 编辑

[leetcode]Gas Station @ Python

摘要: 原题地址:https://oj.leetcode.com/problems/gas-station/题意:There areNgas stations along a circular route, where the amount of gas at stationiisgas[i].You ha... 阅读全文

posted @ 2014-09-14 10:39 AIDasr 阅读(280) 评论(0) 推荐(0) 编辑

[leetcode]Plus One @ Python

摘要: 原题地址:https://oj.leetcode.com/problems/plus-one/题意:Given a non-negative number represented as an array of digits, plus one to the number.The digits are... 阅读全文

posted @ 2014-09-14 04:58 AIDasr 阅读(209) 评论(0) 推荐(0) 编辑

导航