首页
题库
公司真题
专项练习
面试题库
在线编程
面试
面试经验
AI 模拟面试
简历
求职
学习
基础学习课
实战项目课
求职辅导课
专栏&文章
竞赛
我要招人
发布职位
发布职位、邀约牛人
更多企业解决方案
AI面试、笔试、校招、雇品
HR免费试用AI面试
最新面试提效必备
登录
/
注册
码主
获赞
0
粉丝
0
关注
0
看过 TA
2
安徽理工大学
2015
Web前端
IP属地:上海
暂未填写个人简介
私信
关注
拉黑
举报
举报
确定要拉黑码主吗?
发布(13)
评论
刷题
收藏
码主
关注TA,不错过内容更新
关注
2024-06-12 10:27
安徽理工大学 Web前端
题解 | #求平方根#
/** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param x int整型 * @return int整型 */ function sqrt( x ) { // write code here let start = 0 let end = x while(start < end) { const mid = start + ((end - start) >> 1) if(mid * mid === x) { return mid } if(mid * mid > x) { end = mid - 1 } else i...
0
点赞
评论
收藏
分享
2024-06-12 00:21
安徽理工大学 Web前端
题解 | #最长回文子串#
/** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param A string字符串 * @return int整型 */ function getLongestPalindrome( A ) { // write code here A = A.split('') if(A.length === 1) return 1 let maxSize = 1 const compare = (left, right) => { let size = 1 while(left >= 0 && right < A.len...
0
点赞
评论
收藏
分享
2024-06-06 15:23
安徽理工大学 Web前端
题解 | #链表内指定区间反转#
/* * function ListNode(x){ * this.val = x; * this.next = null; * } */ /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param head ListNode类 * @param m int整型 * @param n int整型 * @return ListNode类 */ function reverseBetween( head , m , n ) { // write code here const nodeArr = [] while(head) { nodeArr....
0
点赞
评论
收藏
分享
2024-06-06 13:27
安徽理工大学 Web前端
题解 | #数组扁平化#
{"html":"<!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <meta charset=\"UTF-8\">\n </head>\n <body>\n \n <script>\n const _flatten = arr => {\n // 补全代码\n return arr.reduce((prev, cur) => {\n return prev.concat(Array.i...
0
点赞
评论
收藏
分享
2024-06-06 13:18
安徽理工大学 Web前端
题解 | #列表内容排序再渲染#
{"html":"<!DOCTYPE html>\n<html>\n\n<head>\n <meta charset=\"utf-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\n\n</head>\n\n<body>\n <ul id=\"myList\">\n <...
0
点赞
评论
收藏
分享
2024-06-06 13:17
安徽理工大学 Web前端
题解 | #计数器#
{"html":"<!DOCTYPE html>\r\n<html>\r\n <head>\r\n <meta charset=utf-8>\r\n </head>\r\n <body>\r\n \t\r\n <script type=\"text/javascript\">\r\n const closure = () => {\r\n // 补全代码\r\n let count = 0\r\n return () => {\r\n count +...
0
点赞
评论
收藏
分享
2024-06-06 13:14
安徽理工大学 Web前端
题解 | #新数组#
{"html":"<!DOCTYPE html>\r\n<html>\r\n <head>\r\n <meta charset=utf-8>\r\n </head>\r\n <body>\r\n \t\r\n <script type=\"text/javascript\">\r\n const _delete = (array,index) => {\r\n // 补全代码\r\n return array.filter(x => x !== ar...
0
点赞
评论
收藏
分享
2024-06-06 13:05
安徽理工大学 Web前端
题解 | #无重复数组#
{"html":"<!DOCTYPE html>\r\n<html lang=\"en\">\r\n <head>\r\n <meta charset=\"UTF-8\">\r\n </head>\r\n <body>\r\n\r\n <script>\r\n const _getUniqueNums = (start,end,n) => {\r\n // 补全代码\r\n const getRandomNumber = (s, e) ...
0
点赞
评论
收藏
分享
2024-06-06 12:55
安徽理工大学 Web前端
题解 | #判断版本#
{"html":"<!DOCTYPE html>\r\n<html>\r\n <head>\r\n <meta charset=utf-8>\r\n </head>\r\n <body>\r\n \t\r\n <script type=\"text/javascript\">\r\n const _shouldUpdate = (oldVersion, newVersion) => {\r\n // 补全代码\r\n let oldVersionArr =...
0
点赞
评论
收藏
分享
2024-04-22 15:13
安徽理工大学 Web前端
题解 | #连续子链表最大和#
/* * function ListNode(x){ * this.val = x; * this.next = null; * } */ /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param head ListNode类 * @return int整型 */ function FindGreatestSumOfSubArray( head ) { // write code here if(!head) return null if(!head.next) return head.val let node = head.next le...
0
点赞
评论
收藏
分享
2024-04-15 22:47
安徽理工大学 Web前端
题解 | #最长无重复子数组#
/** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param arr int整型一维数组 the array * @return int整型 */ export function maxLength(arr: number[]): number { // write code here if(arr.length <= 1) return arr.length let i = 0 let j = 1 let cur = [arr[i]] const maxArr = [] while(j < arr.length) { if(arr...
0
点赞
评论
收藏
分享
2024-04-15 20:28
安徽理工大学 Web前端
题解 | #旋转数组的最小数字#
/** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param nums int整型一维数组 * @return int整型 */ function minNumberInRotateArray( nums ) { // write code here if(!nums || !nums.length) return null if(nums.length === 1) return nums[0] let i = 0 if(nums[i] < nums[nums.length - 1]) return nums[0] while( i &...
0
点赞
评论
收藏
分享
2024-04-15 08:55
安徽理工大学 Web前端
题解 | #反转链表#
/*class ListNode { * val: number * next: ListNode | null * constructor(val?: number, next?: ListNode | null) { * this.val = (val===undefined ? 0 : val) * this.next = (next===undefined ? null : next) * } * } */ /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param head ListNode类 * @return ListNode类...
0
点赞
评论
收藏
分享
1
创作者周榜
更多
关注他的用户也关注了:
牛客网
牛客网在线编程
牛客网题解
牛客企业服务