首页
题库
面试
求职
学习
竞赛
More+
所有博客
搜索面经/职位/试题/公司
搜索
我要招人
去企业版
登录 / 注册
offer一个就好
电子科技大学
2020届
算法工程师
关注
私信
加入黑名单
举报TA
TA的博客
首页
刷题
圈子
项目
笔记
基本资料
真题试卷
在线编程
心理测试
回答的问题(16)
删除链表中重复的结点
0
class Solution: def deleteDuplication(self, pHead): if not pHead or not pHead.next:return pHead Head=ListNode(0) Head.next...
发表于 2019-10-05 16:46:00
把字符串转换成整数
0
# -*- coding:utf-8 -*- class Solution: def StrToInt(self, s): if not s or (len(s)==1 and (s[0]=='+' or s[0]=='-')) :return 0 num_d...
发表于 2019-10-04 15:19:13
求1+2+3+...+n
0
解法一:递归 # -*- coding:utf-8 -*- class Solution: def Sum_Solution(self, n): if n==1:return 1 while n>1: return n+self.Sum_Soluti...
发表于 2019-10-03 21:03:20
丰收
0
if __name__=='__main__': n=int(input()) apple=list(map(int,input().strip().split())) m=int(input()) query=list(map(int,input().strip()...
发表于 2019-08-26 13:25:09
滑动窗口的最大值
0
# -*- coding:utf-8 -*- class Solution: def maxInWindows(self, num, size): # 联想CNN中卷积核,滑动窗口数量一共有k:(数组size-窗口size)/1+1 # 且窗口开头为前k个元素...
发表于 2019-08-06 22:38:44
矩阵中的路径
0
class Solution: def hasPath(self, matrix, rows, cols, path): if not matrix:#没有返回False return False if not path: ...
发表于 2019-08-06 22:30:58
机器人的运动范围
1
# -*- coding:utf-8 -*- class Solution: #python版本的回溯法 def __init__(self): self.count = 0 def move(self, threshold, xi, yi, rows, co...
发表于 2019-08-05 00:38:15
数据流中的中位数
0
class Solution: def __init__(self): self.c=[] def Insert(self, num): self.c.append(num)#读入数据流的函数 def GetMedian(self,***): ...
发表于 2019-07-30 19:53:42
链表中环的入口结点
0
class Solution: def EntryNodeOfLoop(self, pHead): if not pHead: return None result = [] while pHead: ...
发表于 2019-07-28 17:55:49
和为S的两个数字
0
class Solution: def FindNumbersWithSum(self, array, tsum): # 借助一个列表,依次把数放入其中,如果差值在里面就返回,不在就继续放 if not array: return []...
发表于 2019-07-27 13:45:52
首页
上一页
1
2
下一页
末页
扫描二维码,关注牛客网
意见反馈
下载牛客APP,随时随地刷题