摘要: 学习地址: https://www.bilibili.com/video/BV1Y7411d7Ys?p=2&vd_source=001ba1b001e88ca6d09a9b0de2a86d71 colab链接: https://colab.research.google.com/gist/cyber 阅读全文
posted @ 2023-01-03 18:42 秋月桐 阅读(21) 评论(0) 推荐(0) 编辑
摘要: ![](https://img2022.cnblogs.com/blog/2344291/202208/2344291-20220806203700788-1525612051.png) 阅读全文
posted @ 2022-08-06 20:37 秋月桐 阅读(42) 评论(0) 推荐(0) 编辑
摘要: ![](https://img2022.cnblogs.com/blog/2344291/202207/2344291-20220710222518206-1168239931.png) 阅读全文
posted @ 2022-07-10 22:26 秋月桐 阅读(93) 评论(0) 推荐(0) 编辑
摘要: 堆排序: 1.堆排序视为一颗完全二叉树,初始序号按层序赋予,从1开始。 2.与快排时间复杂度相同logn,常数空间复杂度 3.不稳定 4.对于有序,无序的序列效率区别不大。 堆排序的核心操作: 建堆 BuildMaxHeap(); 从[n/2]到根节点1,循环根据当前节点为调整子树。 调整 Heap 阅读全文
posted @ 2022-06-08 20:17 秋月桐 阅读(56) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.cn/problems/find-all-duplicates-in-an-array/ 1.值域和变量相同空间映射 class Solution { public: vector<int> findDuplicates(vector<int>& nums) { / 阅读全文
posted @ 2022-05-10 22:17 秋月桐 阅读(32) 评论(0) 推荐(0) 编辑
摘要: 微信小程序仅支持wss,https。 操作步骤: 1.获取ssl证书,阿里云免费的20个 2.微信公众平台进行配置socket服务器,记得是小程序登录(注意要指定端口号),仔细查看文档。 emqx文档:https://docs.emqx.com/zh/cloud/latest/connect_to_ 阅读全文
posted @ 2022-05-10 15:59 秋月桐 阅读(446) 评论(0) 推荐(0) 编辑
摘要: 一题双解: 1.临界矩阵+dfs 查询二维矩阵邻接分量 // 题目要求:output 指定城市沦陷后需要修复的路的条数 // 图的存储,因为要多次查询两节点是否连接,所以用邻接矩阵,相比邻接表的时间更低 #include<bits/stdc++.h> using namespace std; con 阅读全文
posted @ 2022-05-02 16:35 秋月桐 阅读(28) 评论(0) 推荐(0) 编辑
摘要: 简单题:中序+归并 class Solution { public: vector<int> ans1,ans2,ans3; void dfs(TreeNode* root,vector<int> &ans){ if(root==nullptr) return ; dfs(root->left,an 阅读全文
posted @ 2022-05-01 23:19 秋月桐 阅读(14) 评论(0) 推荐(0) 编辑
摘要: 这题有点复杂,参考了柳神的代码 要搞清楚这里面的结构体 #include<bits/stdc++.h> using namespace std; struct Stu{ int id,best;//best是最好排名的学科index int score[4],rank[4]; }stus[2010] 阅读全文
posted @ 2022-04-30 21:08 秋月桐 阅读(21) 评论(0) 推荐(0) 编辑
摘要: 简单题 #include<bits/stdc++.h> using namespace std; int main(){ float cnt=1; for(int i=1;i<=3;i++){ float w,t,l; cin>>w>>t>>l; if(w>t && w>l){ cout<<"W " 阅读全文
posted @ 2022-04-30 21:06 秋月桐 阅读(5) 评论(0) 推荐(0) 编辑