Mr__Nobody
Mr__Nobody
全部文章
题解
归档
标签
去牛客网
登录
/
注册
Mr__Nobody的博客
全部文章
/ 题解
(共19篇)
python | #买卖股票的最好时机#
# # # @param prices int整型一维数组 # @return int整型 # class Solution: def maxProfit(self , prices ): # write code here p_min = prices[...
Python3
2021-09-24
0
417
python | #数组中相加和为0的三元组#
# # # @param num int整型一维数组 # @return int整型二维数组 # class Solution: def threeSum(self , num ): # write code here length = len(num) ...
Python3
2021-09-23
3
944
python | #螺旋矩阵#
# # # @param matrix int整型二维数组 # @return int整型一维数组 # class Solution: def spiralOrder(self , matrix ): # write code here if len(ma...
Python3
2021-09-18
0
600
python| #按之字形顺序打印二叉树#
# -*- coding:utf-8 -*- # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None cl...
Python3
2021-09-17
0
415
python | #大数加法#
# # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # 计算两个数之和 # @param s string字符串 表示第一个整数 # @param t string字符串 表示第二个整数 # @return string字符串 # class Solution: ...
Python3
2021-09-16
1
836
python | #删除链表的倒数第n个节点#
# class ListNode: # def __init__(self, x): # self.val = x # self.next = None # # # @param head ListNode类 # @param n int整型 # @r...
Python3
2021-09-16
0
663
python | #括号序列#
# # # @param s string字符串 # @return bool布尔型 # class Solution: def isValid(self , s ): # write code here dic = {'(':')','{' :"...
Python3
2021-09-15
4
551
python | #链表中的节点每k个一组翻转#
# class ListNode: # def __init__(self, x): # self.val = x # self.next = None # # # @param head ListNode类 # @param k int整型 # @r...
2021-09-11
0
486
python | #最小的K个数#
# -*- coding:utf-8 -*- class Solution: def GetLeastNumbers_Solution(self, tinput, k): # write code here if len(tinput) == 0 or k =...
python
2021-09-08
0
400
python | #最长无重复子数组#
思路1,使用一个临时数组作为子数组,遍历一遍 class Solution: def maxLength(self , arr ): if len(arr) in [0,1]: return len(arr) max_sub = 0 ...
2021-09-07
0
772
首页
上一页
1
2
下一页
末页