Shu-How Zの小窝

Loading...
摘要: 230.二叉搜索树中第k小的元素 /** * Definition for a binary tree node. * function TreeNode(val, left, right) { * this.val = (val undefined ? 0 : val) * this.left = 阅读全文
posted @ 2024-11-30 15:25 KooTeam 阅读(36) 评论(0) 推荐(0)
摘要: class TreeNode { constructor(val, left = null, right = null) { this.val = val; this.left = left; this.right = right; } } var isValidBST = function (ro 阅读全文
posted @ 2024-11-23 21:50 KooTeam 阅读(66) 评论(0) 推荐(0)
摘要: var maxDepth = function(root) { if(root null)return 0 let leftMax=1 let rightMax=1 if(root.left)leftMax=maxDepth(root.left)+1 if(root.right)rightMax=m 阅读全文
posted @ 2024-11-17 16:11 KooTeam 阅读(28) 评论(0) 推荐(0)
摘要: npx react-native@latest init AwesomeProject 配置gradle https://blog.csdn.net/weixin_44843569/article/details/120873183 gradle 下载慢 https://blog.csdn.net/ 阅读全文
posted @ 2024-06-23 13:56 KooTeam 阅读(124) 评论(0) 推荐(0)
摘要: 操作数据库 -- 链接数据库 mysql -uroot -p -- 退出数据库 quit/exit -- 显示数据库版本 select version(); -- 查看当前使用的数据库 select database(); -- 查看所有数据库 show databases; -- 创建数据库 cr 阅读全文
posted @ 2024-01-14 22:04 KooTeam 阅读(72) 评论(0) 推荐(0)
摘要: 每一行称为记录 每一列称为字段 SQL SQL语句的作用是实现数据库D客户端和服务端之间的通信.其表现口形式为:D带有一定格式的字符串. 1970年E.F.Codd的《A Relational Modelof Data forLarge Shared Data Banks》的论文开始讲起。该论文奠定 阅读全文
posted @ 2024-01-14 21:55 KooTeam 阅读(39) 评论(0) 推荐(0)
摘要: 自定义事件总线 自定义事件总线属于一种观察者模式,其中包括三个角色: 口发布者(Publisher):发出事件(Event); 口订阅者(Subscriber):订阅事件(Event),并且会进行响应(Handler); 口事件总线(EventBus):无论是发布者还是订阅者都是通过事件总线作为中台 阅读全文
posted @ 2023-10-14 22:18 KooTeam 阅读(116) 评论(0) 推荐(0)
摘要: 深拷贝基本实现 1 深拷贝基本实现 2 function isObject(value){ 3 const valueType=typeof value 4 return (value!==null)&&(valueType 'object'||valueType 'function') 5 } 6 阅读全文
posted @ 2023-10-14 22:15 KooTeam 阅读(34) 评论(0) 推荐(0)
摘要: 防抖函数基本实现 1 function debounce(fn,delay){ 2 let timer=null 3 return function(...args){ 4 if(timer)clearTimeout(timer) 5 timer=setTimeout(() => { 6 fn.ap 阅读全文
posted @ 2023-10-14 17:52 KooTeam 阅读(43) 评论(0) 推荐(0)
摘要: 1 // ES6 ES2015 2 // https://promisesaplus.com 3 4 const PROMISE_STATUS_PENDING = 'pending' 5 const PROMISE_STATUS_FULFILLED = 'fulfilled' 6 const PRO 阅读全文
posted @ 2023-09-17 19:51 KooTeam 阅读(28) 评论(0) 推荐(0)