七灵微
七灵微
全部文章
分类
归档
标签
去牛客网
登录
/
注册
七灵微的博客
全部文章
(共4篇)
题解 | #二叉树遍历#
import sys def creat(node,preorder,inorder,index): j=0 node.val=preorder[index] left=[] for j in range(len(inorder)): if(inor...
2024-08-04
0
122
题解 | #二叉树遍历#
import sys def creat(node,string,index): if(index==len(string)): return -1 if(index>-1): char=string[index] if(char...
2024-08-03
0
138
题解 | #玛雅人的密码##python3#
import sys def swap(s,i,j): #print(i,j) if(j+1<len(s)): s=s[:i]+s[j]+s[i]+s[j+1:] elif(j+1==len(s)):s=s[:i]+s[j] else:s=s[:...
2024-08-02
1
153
题解 |python版 #Repeater#
import sys template_ = [] def big(n, t, result): # 原模版长度,模版,结果 new_num = len(result) * n # 新画布行数 new_result = [[] for i in range(new_num)...
2024-05-11
1
237