首页
题库
公司真题
专项练习
面试题库
在线编程
面试
面试经验
AI 模拟面试
简历
求职
学习
基础学习课
实战项目课
求职辅导课
专栏&文章
竞赛
搜索
我要招人
发布职位
发布职位、邀约牛人
更多企业解决方案
AI面试、笔试、校招、雇品
HR免费试用AI面试
最新面试提效必备
登录
/
注册
牛客935986753号
获赞
0
粉丝
0
关注
0
看过 TA
0
岭南师范学院
2023
Web前端
IP属地:广东
暂未填写个人简介
私信
关注
拉黑
举报
举报
确定要拉黑牛客935986753号吗?
发布(8)
评论
刷题
收藏
牛客935986753号
关注TA,不错过内容更新
关注
2023-06-29 18:01
岭南师范学院 Web前端
题解 | #反转链表#
import java.util.*; /* * public class ListNode { * int val; * ListNode next = null; * public ListNode(int val) { * this.val = val; * } * } */ public class Solution { /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param head ListNode类 * @return ListNode类 */ public ListNode ReverseList (ListNode he...
0
点赞
评论
收藏
分享
2023-06-29 17:47
岭南师范学院 Web前端
题解 | #圣诞树#
{"css":"","js":"","html":"<!DOCTYPE html>\n<html>\n <head>\n <meta charset=utf-8>\n <style type=\"text/css\">\n .topbranch {\n width: 0px;\n height: 0px;\n /*\n * TODO: 上枝叶效果\n */\n border-style:solid;\n border-width:100px;\n border-color:green;\n border-left-color:tran...
0
点赞
评论
收藏
分享
2023-06-29 17:38
岭南师范学院 Web前端
题解 | #链表相加(二)#
import java.util.*; /* * public class ListNode { * int val; * ListNode next = null; * public ListNode(int val) { * this.val = val; * } * } */ public class Solution { /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param head1 ListNode类 * @param head2 ListNode类 * @return ListNode类 */ public ListNod...
0
点赞
评论
收藏
分享
2023-06-27 22:37
岭南师范学院 Web前端
题解 | #两个链表的第一个公共结点#
import java.util.*; /* public class ListNode { int val; ListNode next = null; ListNode(int val) { this.val = val; } }*/ public class Solution { public ListNode FindFirstCommonNode(ListNode pHead1, ListNode pHead2) { int length1 = ListNodeLength(pHead1); int length2 = ListNodeLength(pHead2); if (leng...
0
点赞
评论
收藏
分享
2023-06-27 22:12
岭南师范学院 Web前端
题解 | #字符串变形#
# # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # # @param s string字符串 # @param n int整型 # @return string字符串 # class Solution: def trans(self , s: str, n: int) -> str: # write code here new_words = [] words = s.split(' ') for word in words: new_word = '' for i in range(len(word)): ch = word[i] if ch.lo...
0
点赞
评论
收藏
分享
2023-06-27 22:03
岭南师范学院 Web前端
题解 | #用两个栈实现队列#
import java.util.*; import java.util.Stack; public class Solution { Stack<Integer> stack1 = new Stack<Integer>(); Stack<Integer> stack2 = new Stack<Integer>(); public void push(int node) { stack1.add(node); } public int pop() { if (stack2.empty()) while (!stack1.empty()) { st...
0
点赞
评论
收藏
分享
2023-06-25 21:04
岭南师范学院 Web前端
题解 | #二分查找-I#
import java.util.*; public class Solution { /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param nums int整型一维数组 * @param target int整型 * @return int整型 */ public int search (int[] nums, int target) { // write code here int mid, num; int left = 0; int right = nums.length-1; while (left <= right) ...
0
点赞
评论
收藏
分享
2023-06-25 19:31
岭南师范学院 Web前端
题解 | #序列找数#
import sys nums = set() for line in sys.stdin: ins = line.split() [nums.add(int(num)) for num in ins] l = len(nums) pre = nums.pop() if pre == 0: for i in range(l-1): cur = nums.pop() if pre + 1 == cur: pre = cur continue else: print(pre + 1) break else: print(0) 看题目要求,序列是从0开始的,也就需要对初始值进行判断。本次解题利用se...
0
点赞
评论
收藏
分享
1
创作者周榜
更多
关注他的用户也关注了:
牛客网
牛客网在线编程
牛客网题解
牛客企业服务