首页
题库
公司真题
专项练习
面试题库
在线编程
面试
面试经验
AI 模拟面试
简历
求职
学习
课程
专栏·文章
竞赛
搜索
我要招人
发布职位
发布职位、邀约牛人
更多企业解决方案
在线笔面试、雇主品牌宣传
登录
/
注册
porcupine28
获赞
1
粉丝
0
关注
2
看过 TA
0
Ecole Supérieure des Technologies Industrielles Avancées
2021
算法工程师
IP属地:未知
暂未填写个人简介
私信
关注
拉黑
举报
举报
确定要拉黑porcupine28吗?
发布(19)
刷题
porcupine28
2021-10-09 11:04
算法工程师
2021-10-09
在牛客打卡7天,今天也很努力鸭!
每日监督打卡
0
点赞
评论
收藏
转发
porcupine28
2021-09-27 09:54
算法工程师
题解 | #合并两个有序的数组#
# # # @param A int整型一维数组 # @param B int整型一维数组 # @return void # class Solution: def merge(self , A, m, B, n): # write code here Am = m An = n while(m-1>=0 and n-1>=0): if(A[m-1]>=B[n-1]): A[m+n-1] = A[m-1] m =...
0
点赞
评论
收藏
转发
porcupine28
2021-09-27 08:53
算法工程师
题解 | #链表中倒数最后k个结点#
# class ListNode: # def __init__(self, x): # self.val = x # self.next = None # # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # # @param pHead ListNode类 # @param k int整型 # @return ListNode类 # class Solution: def FindKthToTail(self , pHead , k ): # write code here ...
0
点赞
评论
收藏
转发
porcupine28
2021-09-15 10:24
算法工程师
题解 | #统计字符#
import re while(True): try: a = input().strip() c = 0 s = 0 d = 0 o = 0 for i in a: if re.search('[a-zA-Z]', i): c += 1 elif re.search('\d', i): d += 1 elif re.search(' ', i): ...
0
点赞
评论
收藏
转发
porcupine28
2021-09-10 10:19
算法工程师
题解 | #矩阵的最小路径和#
# # # @param matrix int整型二维数组 the matrix # @return int整型 # class Solution: def minPathSum(self , matrix ): # write code here m = len(matrix) n = len(matrix[0]) temp = matrix for i in range(0, m): for j in range(0, n): if(i==0 a...
0
点赞
评论
收藏
转发
porcupine28
2021-09-05 22:19
算法工程师
题解 | #合并区间#
class Solution: def merge(self , intervals ): # write code here intervals.sort(key=lambda x:x.start) merge = [] for interval in intervals: if not merge or merge[-1].end < interval.start: merge.append(interval) else: ...
0
点赞
评论
收藏
转发
porcupine28
2021-08-29 21:22
算法工程师
题解 | #岛屿数量#
class Solution: def solve(self , grid ): # write code here row_l = len(grid) col_l = len(grid[0]) count = 0 for r in range(row_l): for c in range(col_l): if grid[r][c] == "1": self.set_grid(r,c,gri...
0
点赞
评论
收藏
转发
porcupine28
2021-08-28 18:41
算法工程师
题解 | #判断一个链表是否为回文结构#
class Solution: def isPail(self , head ): # write code here slow, fast = head, head rev = ListNode(None) while fast and fast.next: fast = fast.next.next slow_next = slow.next slow.next = rev rev = slow s...
0
点赞
评论
收藏
转发
porcupine28
2021-08-24 21:19
算法工程师
题解 | #数组中出现次数超过一半的数字#
class Solution: def solve(self , a): # write code here i = 0 while (i<len(a)): if a[i] != i: return i if i==len(a)-1: return i+1 i+=1
0
点赞
评论
收藏
转发
porcupine28
2021-08-16 09:51
算法工程师
2021-08-16
在牛客打卡6天,今天也很努力鸭!
每日监督打卡
0
点赞
评论
收藏
转发
porcupine28
2021-08-06 11:18
算法工程师
题解 | #按之字形顺序打印二叉树#
# -*- coding:utf-8 -*- # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: def Print(self, pRoot): # write code here # write code here result = [] if not pRoot: r...
0
点赞
评论
收藏
转发
porcupine28
2021-08-05 09:59
算法工程师
题解 | #括号序列#
class Solution: def isValid(self , s ): # write code here stack = [] match = {'(':')', '[':']','{':'}'} for i in s: if i in match: stack.append(i) else: if not stack or match[stack.pop()] != i: ...
0
点赞
评论
收藏
转发
porcupine28
2021-08-03 10:03
已编辑
算法工程师
题解 | #最长无重复子数组#
# # # @param arr int整型一维数组 the array # @return int整型 # class Solution: def maxLength(self , arr ): # write code here f=l=0 max_len = 0 if(len(arr)<2): return len(arr) while f+1 < len(arr): if(arr[f+1] not in arr[l:f+1]): ...
0
点赞
评论
收藏
转发
porcupine28
2021-07-30 09:08
算法工程师
2021-07-30
在牛客打卡5天,今天也很努力鸭!
每日监督打卡
0
点赞
评论
收藏
转发
porcupine28
2021-07-29 11:48
已编辑
算法工程师
题解 | NC65 斐波那契数列
# -*- coding:utf-8 -*- class Solution: def Fibonacci(self, n): # write code here i, j = 0, 1 for _ in range(n): i, j = j, i+j return i
0
点赞
评论
收藏
转发
1
2
工具箱
TA的圈子
暂未加入圈子
TA的圈子
TA的笔记
暂无笔记
TA的笔记
登录
0
天
已登录
0
天
连续登录
0
人
今日访客
牛客网
牛客企业服务