摘要: 题目连接:https://github.com/iszu/web-learning/blob/master/JavaScript%E7%BB%83%E4%B9%A0%E9%A2%98.md function countRepeat(arr) { var a = {}; for (var i = 0; 阅读全文
posted @ 2020-09-11 14:42 huluxin 阅读(218) 评论(0) 推荐(0) 编辑
摘要: 题目地址:https://github.com/iszu/web-learning/blob/master/JavaScript%E7%BB%83%E4%B9%A0%E9%A2%98.md function daySpan(date1, date2) { var t = date2.getTime( 阅读全文
posted @ 2020-09-10 11:37 huluxin 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 大写字母A-Z对应的ASCII码值是65-90小写字母a-z对应的ASCII码值是97-122 将字母转为ascii码的方法: var str = "A"; str.charCodeAt(); // 65 var str1 = 'a'; str1.charCodeAt(); // 97 将ascii 阅读全文
posted @ 2020-09-10 11:29 huluxin 阅读(4450) 评论(0) 推荐(0) 编辑
摘要: function firstNonRepeat(str) { var a = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; for (var i = 0; i < str.leng 阅读全文
posted @ 2020-09-10 11:25 huluxin 阅读(369) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include #include #include #include #include #include #include using namespace std; int main(int argc, char *argv[]) { long long n,m; double sum... 阅读全文
posted @ 2018-11-21 16:13 huluxin 阅读(222) 评论(0) 推荐(0) 编辑
摘要: 关于kmp算法的理解视频(无代码):https://www.bilibili.com/video/av3246487?from=search&seid=8973861086110677788 阅读全文
posted @ 2018-11-11 22:56 huluxin 阅读(102) 评论(0) 推荐(0) 编辑
摘要: 这题卡了还蛮久的,矩阵还是有一点陌生啊。 阅读全文
posted @ 2018-11-11 20:59 huluxin 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 写得有点自闭啊。这题的中心思想应该是将左边和右边差距最小的两个合并。 阅读全文
posted @ 2018-11-11 15:46 huluxin 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 3 int n,T,cnt; 4 5 int read() 6 { 7 char ch = getchar(); 8 int num = 0; 9 bool fl = 0; 10 for (; !isdigit(ch); ch=getchar()) 11 if (ch=='-') fl = 1; 12... 阅读全文
posted @ 2018-11-05 22:49 huluxin 阅读(111) 评论(0) 推荐(0) 编辑
摘要: ^相同为0,不同为1 &都为1为1,其他为0 1.如果(n&(n-1))==0,则n是2的幂或0; 2.求二进制数n当中1的个数 阅读全文
posted @ 2018-11-05 22:45 huluxin 阅读(726) 评论(0) 推荐(0) 编辑