Shu-How Zの小窝

Loading...
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 24 下一页
摘要: 347.前K个高频元素 /** * @param {number[]} nums * @param {number} k * @return {number[]} */ var topKFrequent = function(nums, k) { let map=new Map(); let arr 阅读全文
posted @ 2025-01-11 13:43 KooTeam 阅读(5) 评论(0) 推荐(0)
摘要: 集合是什么?一种无序且唯一的数据结构。ES6中有集合,名为Set。集合的常用操作:去重、判断某元素是否在集合中、求交集 let arr=[1,2,2,4,5,6,7,8,9,10] let unRepeat=[...new Set(arr)] console.log(unRepeat) let se 阅读全文
posted @ 2025-01-10 22:41 KooTeam 阅读(25) 评论(0) 推荐(0)
摘要: // 双指针 快+1=慢 true class ListNode { constructor(val, next) { this.val = (val undefined ? 0 : val) this.next = (next undefined ? null : next) } } var ha 阅读全文
posted @ 2025-01-10 21:32 KooTeam 阅读(17) 评论(0) 推荐(0)
摘要: LeetCode:83.删除排序链表中的重复元素 class ListNode { constructor(val, next) { this.val = (val undefined ? 0 : val) this.next = (next undefined ? null : next) } } 阅读全文
posted @ 2025-01-10 21:11 KooTeam 阅读(29) 评论(0) 推荐(0)
摘要: 2.两数相加 class ListNode { constructor(val, next) { this.val = (val undefined ? 0 : val) this.next = (next undefined ? null : next) } } /** * @param {Lis 阅读全文
posted @ 2025-01-10 18:37 KooTeam 阅读(20) 评论(0) 推荐(0)
摘要: flowchart TD A[开始] --> B{p1 是否为空} B -->|No| C[保存 p1.next 到 temp] C --> D[将 p1.next 指向 p2] D --> E[更新 p2 为 p1] E --> F[更新 p1 为 temp] F --> B B -->|Yes| 阅读全文
posted @ 2025-01-10 16:16 KooTeam 阅读(12) 评论(0) 推荐(0)
摘要: 237.删除链表中的节点 /** * Definition for singly-linked list. * function ListNode(val) { * this.val = val; * this.next = null; * } */ /** * @param {ListNode} 阅读全文
posted @ 2025-01-10 15:34 KooTeam 阅读(14) 评论(0) 推荐(0)
摘要: var RecentCounter = function() { this.queue=[] }; /** * @param {number} t * @return {number} */ RecentCounter.prototype.ping = function(t) { this.queu 阅读全文
posted @ 2025-01-10 14:31 KooTeam 阅读(25) 评论(0) 推荐(0)
摘要: /** * @param {string} s * @return {boolean} */ var isValid = function(s) { if(s.length%2 1)return false; let stack=[]; for(let i=0;i<s.length;i++){ le 阅读全文
posted @ 2025-01-09 22:32 KooTeam 阅读(12) 评论(0) 推荐(0)
摘要: Node.js仿知乎服务端-深入理解RESTful API '第1章 学习之前要告诉你的/1-1 关于这门课程你想知道的都在这一节里面了~1' 理解RESTful API的6个限制和若干最佳实践掌握Koa2、Postman、MongoDB、JWT等技术运用上述技术搭建仿知乎RESTful API掌握 阅读全文
posted @ 2025-01-09 21:40 KooTeam 阅读(41) 评论(0) 推荐(0)
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 24 下一页