怕浪猫
怕浪猫
全部文章
分类
题解(20)
归档
标签
去牛客网
登录
/
注册
怕浪猫的博客
热爱JavaScript开发、关注web前端、学习新时代程序运行
全部文章
(共34篇)
题解 | #跳台阶#
/** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param number int整型 * @return int整型 */ function jumpFloor( number ) { // write code here ...
2023-07-03
0
121
题解 | #矩阵中的路径#
/** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param matrix char字符型二维数组 * @param word string字符串 * @return bool布尔型 */ function hasPath(matrix...
2023-06-19
1
112
题解 | #求1+2+3+...+n#
function Sum_Solution(n) { // write code here n && (n += Sum_Solution(n-1)); return n; } module.exports = { Sum_Solution : Sum_Solutio...
2023-06-14
0
120
题解 | #求1+2+3+...+n#
function Sum_Solution(n) { // write code here return (1+n)*n / 2; } module.exports = { Sum_Solution : Sum_Solution };
2023-06-14
0
148
题解 | #左旋转字符串#
function LeftRotateString(str, n) { // write code here if(!str) return ""; for(let i = 0; i < n; i++){ str = str.slice(1) + str...
2023-06-14
0
114
题解 | #左旋转字符串#
function LeftRotateString(str, n) { // write code here if(n === 0) return str; if(!str) return ""; for(let i = 0; i < n; i++){ ...
2023-06-14
0
122
题解 | #最长不含重复字符的子字符串#
/** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param s string字符串 * @return int整型 */ function lengthOfLongestSubstring(s) { // write code ...
2023-06-14
0
145
题解 | #数值的整数次方#
function Power(base, exponent) { // write code here let result = 1; if (exponent === 0) return 1; if (exponent === 1) return base; ...
2023-06-07
0
157
题解 | #二维数组中的查找#
function Find(target, array) { // write code here for (let a of array) { for (let t of a) { if (t === target) return true;...
2023-06-05
0
113
题解 | #不用加减乘除做加法#
function Add(num1, num2) { // write code here let x, y; while (num2 !== 0) { x = num1 ^ num2; y = (num1 & num2) << 1...
2023-05-02
0
124
首页
上一页
1
2
3
4
下一页
末页