![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
leetcode
zhqleetcode
这个作者很懒,什么都没留下…
展开
-
Fraction to Recurring Decimal
class Solution: # @param {integer} numerator # @param {integer} denominator # @return {string} def fractionToDecimal(self, numerator, denominator): result='' hashmap=dic原创 2015-07-01 15:07:18 · 180 阅读 · 0 评论 -
Pascal's Triangle
class Solution: # @param {integer} numRows # @return {integer[][]} def generate(self, numRows): tri=[] if numRows==0: return [] cur=[1] tri.appen原创 2015-07-01 16:15:44 · 179 阅读 · 0 评论 -
Merge Sorted Array
class Solution: # @param {integer[]} nums1 # @param {integer} m # @param {integer[]} nums2 # @param {integer} n # @return {void} Do not return anything, modify nums1 in-place instea原创 2015-07-01 16:17:09 · 199 阅读 · 0 评论 -
Climbing Stairs
class Solution: # @param {integer} n # @return {integer} def climbStairs(self, n): step=[0 for i in range(n+2)] step[0]=1 step[1]=2 if n<=2: retu原创 2015-07-01 16:17:42 · 191 阅读 · 0 评论 -
Longest Common Prefix
class Solution: # @param {string[]} strs # @return {string} def longestCommonPrefix(self, strs): if strs == []: return '' if len(strs)==1: return str原创 2015-07-01 16:19:12 · 184 阅读 · 0 评论 -
Reverse Integer
class Solution: # @param {integer} x # @return {integer} def reverse(self, x): max=0x7fffffff min=-0x80000000 flag=False if x<0: flag=True原创 2015-07-01 16:18:16 · 216 阅读 · 0 评论