- 博客(8)
- 资源 (5)
- 收藏
- 关注
原创 LeetCode OJ 系列之151 Reverse Words in a String --Python
Problem: Given an input string, reverse the string word by word. For example, Given s = "the sky is blue", return "blue is sky the". Update (2015-02-12): For C programmers: Try to so
2015-12-09 01:42:17 503
原创 LeetCode OJ 系列之165 Compare Version Numbers --Python
Problem: Compare two version numbers version1 and version2. If version1 > version2 return 1, if version1 version2 return -1, otherwise return 0. You may assume that the version strings are non-
2015-12-09 01:40:18 857
原创 LeetCode OJ 系列之75 Sort Colors --Python
Problem: Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, white and blue. Here, we will use
2015-12-09 01:37:59 711
原创 LeetCode OJ 系列之58 Length of Last Word --Python
Problem: Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string. If the last word does not exist, return 0.
2015-12-09 01:36:21 774
原创 LeetCode OJ 系列之65 Valid Number --Python
Problem: Validate if a given string is numeric. Some examples: "0" => true " 0.1 " => true "abc" => false "1 a" => false "2e10" => true Note: It is intended for the problem state
2015-12-09 01:34:44 1146
原创 LeetCode OJ 系列之66 Plus One --Python
Problem: Given a non-negative number represented as an array of digits, plus one to the number. The digits are stored such that the most significant digit is at the head of the list. Answ
2015-12-09 01:32:51 1188
原创 LeetCode OJ 系列之73 Set Matrix Zeroes --Python
Problem: Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place. Answer: class Solution(object): def setZeroes(self, matrix): """
2015-12-09 01:31:29 495
原创 LeetCode OJ 系列之118 Pascal's Triangle --Python
Problem: Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5, Return [ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,6,4,1] ]
2015-12-09 01:28:59 647
UNIX环境下C/C++程序的设计(超市帐务管理程序)
2013-05-15
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人