首页
题库
面试
求职
学习
竞赛
More+
所有博客
搜索面经/职位/试题/公司
搜索
我要招人
去企业版
登录 / 注册
北风扬尘尘飞扬
天津大学
2023届
Java工程师
关注
私信
加入黑名单
举报TA
TA的博客
首页
刷题
圈子
项目
笔记
基本资料
真题试卷
在线编程
心理测试
回答的问题(55)
数字序列中某一位的数字
0
class Solution: def findNthDigit(self, n: int) -> int: # write code here low = 0 high = 10 # 1位数字的个数 for i in ...
发表于 2022-03-12 21:25:41
正则表达式匹配
1
import re class Solution: def match(self, str: str, pattern: str) -> bool: # write code here m = re.match(pattern, str) ...
发表于 2022-03-12 20:04:14
剪绳子(进阶版)
0
class Solution: def cutRope(self, number: int) -> int: # 尽可能切割出3 if number == 2: return 1 if number == 3: ...
发表于 2022-03-12 17:29:44
删除链表中重复的结点
0
分享一个递归的解法吧!本质上是寻找合法节点的过程,对于传入的首节点返回只出现一次的节点即可。 public class Solution { public ListNode deleteDuplication(ListNode pHead) { return fin...
发表于 2020-03-07 17:10:45
后缀表达式求值
0
import java.util.*; public class Solution { static int evalRPN(String[] tokens) { Deque<Integer> nums = new LinkedList<>(); ...
发表于 2020-01-03 12:29:14
二叉树的最小深度
0
public class Solution { private int min(int a,int b){ return a>b?b:a; } public int run(TreeNode root) { if(root==null)r...
发表于 2020-01-03 11:22:22
序列化二叉树
0
//层序遍历 /* public class TreeNode { int val = 0; TreeNode left = null; TreeNode right = null; public TreeNode(int val) { this.v...
发表于 2019-11-05 14:23:24
按之字形顺序打印二叉树
0
//解题思路:按BFS思路,分层遍历,根据层数是否翻转即可。 import java.util.*; public class Solution { ArrayList<ArrayList<Integer>> list=new ArrayList<>()...
发表于 2019-11-05 11:54:42
孩子们的游戏(圆圈中最后剩下的数)
0
//模拟了一个循环链表 static int LastRemaining_Solution(int n, int m) { if(n<=0)return -1; node root=new node(0); node p=root; ...
发表于 2019-11-04 23:20:32
左旋转字符串
0
public class Solution { public String LeftRotateString(String str,int n) { if(str.equals(""))return""; return str.subst...
发表于 2019-11-04 16:03:28
首页
上一页
1
2
3
4
5
6
下一页
末页
扫描二维码,关注牛客网
意见反馈
下载牛客APP,随时随地刷题