摘要: 我确定很多人不能真正的理解二叉树……class Node: def __init__(self,value=0,left=0,right=0): self.value=value self.left=left ... 阅读全文
posted @ 2018-06-26 22:30 luoganttcc 阅读(305) 评论(0) 推荐(0) 编辑
摘要: class Student(object): def __init__(self, name, score): self.name = name self.score = scorest=Student('lg',99)pr... 阅读全文
posted @ 2018-06-26 13:45 luoganttcc 阅读(86) 评论(0) 推荐(0) 编辑
摘要: nums = [3,1,2]n=len(nums)for i in range(n-1): for j in range(n-i-1): if nums[j]>nums[j+1]: nums[j+1],nums[j]... 阅读全文
posted @ 2018-06-26 13:42 luoganttcc 阅读(75) 评论(0) 推荐(0) 编辑
摘要: import time t1=time.time()def factorial(n): if n==1 or n==2: return 1 else: return factorial(n-1)+factorial(n... 阅读全文
posted @ 2018-06-26 10:27 luoganttcc 阅读(501) 评论(0) 推荐(0) 编辑
摘要: def jiec(n): if n==0: return 1 else: return n*jiec(n-1)ss=jiec(10)print(ss)3628800 阅读全文
posted @ 2018-06-26 10:05 luoganttcc 阅读(268) 评论(0) 推荐(0) 编辑
摘要: c=[]def dcc(dic): for key in dic.keys(): print (key) c.append(key) vv=dic[key] #判断下一级是... 阅读全文
posted @ 2018-06-26 10:03 luoganttcc 阅读(137) 评论(0) 推荐(0) 编辑