首页
题库
面试
求职
学习
竞赛
More+
所有博客
搜索面经/职位/试题/公司
搜索
我要招人
去企业版
登录 / 注册
小小梁
西安电子科技大学
2019届
C++工程师
关注
私信
加入黑名单
举报TA
首页
刷题
圈子
项目
笔记
基本资料
真题试卷
在线编程
心理测试
回答的问题(8)
两个链表的第一个公共结点
0
#让一让,python大法来了 class Solution: def FindFirstCommonNode(self, pHead1, pHead2): # write code here if not pHead1 or not pHead2: ...
发表于 2018-08-19 12:53:26
复杂链表的复制
0
#让一让 python大法来了 class Solution: def Clone(self, pHead): p1 = pHead while p1: p2 = p1.next p1.next = Random...
发表于 2018-08-16 17:22:26
顺时针打印矩阵
0
#python大法好 class Solution: def printMatrix(self, matrix): res = [] while matrix: res += matrix.pop(0) if n...
发表于 2018-08-16 11:36:04
调整数组顺序使奇数位于偶数前面
0
让一让,python大法来了 #一行代码: return sorted(array, key = lambda i: i%2, reverse = True ) #四行代码1: arr1 = [i%2 for i in array] arr2 = [i*j for i,j in zip(arr1...
发表于 2018-08-15 20:19:49
二叉树的深度
0
class Solution: def TreeDepth(self, pRoot): # write code here if pRoot == None: return 0 nLeft = self.TreeDept...
发表于 2018-08-09 09:11:14
数字在升序数组中出现的次数
0
python大法来了~ # -*- coding:utf-8 -*- class Solution: def GetFirstK(self, data,k,a,b): if a>b: return -1 mid = (a+b...
发表于 2018-08-09 08:48:27
二叉树中和为某一值的路径(二)
34
让一让让一让,python大法来了~ class Solution: def FindPath(self, root, expectNumber): def subFindPath(root): if root: b....
发表于 2018-07-01 14:06:29
替换空格
0
让一让,python大法来了 return s.replace(' ','%20')
发表于 2018-06-26 09:36:22
扫描二维码,关注牛客网
意见反馈
下载牛客APP,随时随地刷题