舔出新offer
舔出新offer
全部文章
分类
题解(3)
归档
标签
去牛客网
登录
/
注册
舔出新offer的博客
全部文章
(共50篇)
题解 | #礼物的最大价值#
# # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # # @param grid int整型二维数组 # @return int整型 # class Solution: def maxValue(self , grid: List[List[int]]...
2023-04-02
0
238
题解 | #连续子数组的最大和(二)#
class Solution: def FindGreatestSumOfSubArray(self, array: List[int]) -> List[int]: # write code here dp = [0 for i in range(le...
2023-04-02
0
261
题解 | #在二叉树中找到两个节点的最近公共祖先#
# def __init__(self, x): # self.val = x # self.left = None # self.right = None # # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # ...
2023-04-01
0
219
题解 | #二叉搜索树的最近公共祖先#
# class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None # # 代码中的类名、方法名、参数名已经指定,请勿...
2023-04-01
0
252
题解 | #二叉树中和为某一值的路径(三)#
# class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None # # 代码中的类名、方法名、参数名已经指定,请勿...
2023-04-01
0
236
题解 | #数组分组#
import re import sys n = int(input()) a = list(map(int, input().split())) def check(list1,list2,left): if len(left)==0: sum1 = sum(list...
2023-03-24
0
357
题解 | #24点运算#
from re import T import sys porker = {'J':'11','Q':'12','K':'13','A':'1'} def check(numlist, res, sym): if len(numlist)==0: if res == 24:...
2023-03-23
0
223
题解 | #火车进站#
import sys n = int(input()) trains = input().split() allout = [] def dig(station,notin,outlist): #in if len(notin) >0: station...
2023-03-19
0
221
题解 | #24点游戏算法#
import sys def check(numlist, res): if len(numlist)==0: if res == 24: return True else: return False ...
2023-02-24
0
261
题解 | #判断两个IP是否属于同一子网#
import sys def ipgood(ip): iplist = ip.split('.') if len(iplist)!=4 : return False twostr = '' for i in iplist: if n...
2023-02-10
0
249
首页
上一页
1
2
3
4
5
下一页
末页