小张加油啊
小张加油啊
全部文章
题解
归档
标签
去牛客网
登录
/
注册
小张加油啊的博客
全部文章
/ 题解
(共7篇)
前序+后序+层次
##前序 # -*- coding:utf-8 -*- # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = No...
2021-04-08
0
382
python版本解
# # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # # @param str string字符串 # @return bool布尔型 #方法一:排除法 class Solution: def isNumeric(self , str ): ...
2021-04-05
0
422
剑指offer-35-数组中的逆序对
# -*- coding:utf-8 -*- class Solution: def __init__(self): self.result=0 def InversePairs(self, data): # write code here ...
2021-04-01
0
388
剑指offer-34-第一个只出现一次的字符
# -*- coding:utf-8 -*- class Solution: def FirstNotRepeatingChar(self, s): # write code here indexs=-1 new_s=list(s) ##字符...
2021-04-01
0
383
剑指offer-21-栈的压入、弹出序列
# -*- coding:utf-8 -*- class Solution: def IsPopOrder(self, pushV, popV): # write code here queue=[] i,j=0,0 while...
2021-03-28
0
347
剑指offer-19-顺时针打印矩阵
# -*- coding:utf-8 -*- class Solution: # matrix类型为二维列表,需要返回列表 def printMatrix(self, matrix): # write code here if matrix==None...
2021-03-27
0
387
剑指offer-13:调整数组顺序使奇数位于偶数前面
# # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # # @param array int整型一维数组 # @return int整型一维数组 # class Solution: def reOrderArray(self , array ): ...
2021-03-26
0
484