摘要: 异或运算的简单使用 参考: https://blog.csdn.net/qq_19272431/article/details/78564391 交换两个数 let a = 5 let b = 9 //a ^ b ^ b = a ^ 0 = a; a ^= b; // <=> a = a + b b 阅读全文
posted @ 2022-04-23 21:13 白い故雪 阅读(24) 评论(0) 推荐(0) 编辑
摘要: LeetCode每日一练 Revese Interger /* * @Author: fox * @Date: 2022-04-23 07:09:48 * @LastEditors: fox * @LastEditTime: 2022-04-23 08:33:19 * @Description: h 阅读全文
posted @ 2022-04-23 08:37 白い故雪 阅读(13) 评论(0) 推荐(0) 编辑
摘要: LeetCode每日一练 Zigzag Conversion /* * @Author: fox * @Date: 2022-04-22 07:47:39 * @LastEditors: fox * @LastEditTime: 2022-04-22 11:03:50 * @Description: 阅读全文
posted @ 2022-04-22 11:09 白い故雪 阅读(15) 评论(0) 推荐(0) 编辑
摘要: 立即执行函数(function(){})() 关键词: 立即执行函数 匿名函数 作用域 格式: (function())() 作用: 立即执行函数(function())()是匿名函数, 主要利用函数的作用域, 减少全局变量的使用 解释 前提知识 js中的函数通常有两种命名方式,分别是 声明式函数 阅读全文
posted @ 2022-04-21 17:49 白い故雪 阅读(176) 评论(0) 推荐(0) 编辑
摘要: LeetCode每日一练 Longest Palindromic Substring /* * @Author: fox * @Date: 2022-04-21 06:08:13 * @LastEditors: fox * @LastEditTime: 2022-04-21 11:25:39 * @ 阅读全文
posted @ 2022-04-21 11:29 白い故雪 阅读(18) 评论(0) 推荐(0) 编辑
摘要: LeetCode每日一练 median-of-two-sorted-arrays /* * @Author: fox * @Date: 2022-04-21 05:10:43 * @LastEditors: fox * @LastEditTime: 2022-04-21 05:55:39 * @De 阅读全文
posted @ 2022-04-21 05:57 白い故雪 阅读(13) 评论(0) 推荐(0) 编辑
摘要: LeetCode每日一练 Longest Substring Without Repeating Characters /* * @Author: fox * @Date: 2022-04-20 09:26:20 * @LastEditors: fox * @LastEditTime: 2022-0 阅读全文
posted @ 2022-04-20 09:50 白い故雪 阅读(15) 评论(0) 推荐(0) 编辑
摘要: LeetCode每日一练 add_two_numbers /* * @Author: fox * @Date: 2022-04-19 17:30:35 * @LastEditors: fox * @LastEditTime: 2022-04-19 19:01:44 * @Description: h 阅读全文
posted @ 2022-04-19 19:05 白い故雪 阅读(12) 评论(0) 推荐(0) 编辑
摘要: TS TypeScript是JavaScript的一个超集, 主要提供了类型系统和ES6的支持, 它由Microsoft开发, 代码开源在GitHub上 与JS的区别 类型系统: JavaScript 是一个弱类型语言, 对于变量的类型没有强调, 而TypeScript则对于类型的定义更加严谨和规范 阅读全文
posted @ 2022-04-19 13:17 白い故雪 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 两元判断代码优化 if (node) return 'true' else return 'false' // 优化 return node? 'true' : 'false' // 优化特例 return node && node.val ? 'true' : 'false' // 优化 retu 阅读全文
posted @ 2022-04-19 10:30 白い故雪 阅读(12) 评论(0) 推荐(0) 编辑