摘要:
我确定很多人不能真正的理解二叉树……class Node: def __init__(self,value=0,left=0,right=0): self.value=value self.left=left ... 阅读全文
摘要:
class Student(object): def __init__(self, name, score): self.name = name self.score = scorest=Student('lg',99)pr... 阅读全文
摘要:
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]... 阅读全文
摘要:
import time t1=time.time()def factorial(n): if n==1 or n==2: return 1 else: return factorial(n-1)+factorial(n... 阅读全文
摘要:
def jiec(n): if n==0: return 1 else: return n*jiec(n-1)ss=jiec(10)print(ss)3628800 阅读全文
摘要:
c=[]def dcc(dic): for key in dic.keys(): print (key) c.append(key) vv=dic[key] #判断下一级是... 阅读全文