___11
___11
全部文章
分类
未归档(1)
随笔(2)
归档
标签
去牛客网
登录
/
注册
kongxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
全部文章
(共6篇)
题解 | #全排列#
const _permute = (string) => { let flag = new Array(string.length).fill(0); const len = string.length; let result = []; let res = "";...
2023-07-29
0
342
题解 | #二进制转换#
function convertToBinary(num) { let a = num; let res = ""; while (a >= 1) { res = (a % 2) + res; if (a ...
2023-03-05
0
160
题解 | #无重复数组#
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> </head> <body> <scr...
2023-03-05
0
154
常见问题
某些小问题不容易发现,浪费时间。 数组越界 及时剪枝 涉及整数反转,十的倍数反转会丢掉最后的零,容易发生未知错误。这种情况可以考虑把数存入char类型数组内。 涉及除法要考虑小数,尤其是倍数关系,题目中给的未知量可能是浮点数,整数和浮点数之间的比较大小,最好强制转换,否则会出现未...
2019-07-14
0
519
51nod 1384
给出一个字符串S(可能有重复的字符),按照字典序从小到大,输出S包括的字符组成的所有排列。例如:S = “1312”, 输出为:1123 1132 1213 1231 1312 1321 2113 2131 2311 3112 3121 3211 参阅网上资料,只有用dfs和next_perm...
2019-07-14
0
560
各种常见数据类型大小
short int 1个字节储存 unsigned short int 0~255 short int -128~127 int 2个字节储存 unsigned int 0~4294967295 int 2147483648~2147483647 long 4个字节储存 unsigned l...
2019-07-14
0
549