2023年4月3日

Linux 常用命令

摘要: # 查看对应文件的最后10行 tail /var/log/xxx #查看系统负载页面 top # 查看当前系统中所有进程,并按照占用内存的大小来降序排列 ps aux --sort rss 阅读全文

posted @ 2023-04-03 16:33 hannah_id 阅读(13) 评论(0) 推荐(0)

2022年10月14日

104. 二叉树的最大深度 (easy)

摘要: 递归: 先序遍历 /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(null 阅读全文

posted @ 2022-10-14 16:46 hannah_id 阅读(28) 评论(0) 推荐(0)

94. 二叉树的中序遍历 (easy)

摘要: 递归: 左根右 /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullp 阅读全文

posted @ 2022-10-14 15:21 hannah_id 阅读(19) 评论(0) 推荐(0)

2021年6月25日

TR143

摘要: TR143是干什么的? TR-143 帮助确定网络是否出现问题。TR-143中定义了主动监测和诊断准则。TR-143 的主题是"启用网络吞吐量性能测试和统计监控"。这些测试旨在使用 TR-069 端点作为探头实时检查和测量给定链接的性能。 TR-143 环境中的主动监控允许测量性能指标,从而建立起服 阅读全文

posted @ 2021-06-25 10:56 hannah_id 阅读(1591) 评论(0) 推荐(0)

2021年6月1日

253. Meeting Rooms II

摘要: 扫描线算法 每进入一个区间插一面旗子,出区间拔一面旗子。 相当于在平地上磊台阶,每次进入一个相同的区域,则加一阶台阶,每次出了一个会议室则减少一个台阶。最少使用的房间数,就是台阶的最大高度。并且通过同一个位置的加台阶和减少台阶,可以实现边界处的处理。 class Solution { public: 阅读全文

posted @ 2021-06-01 12:38 hannah_id 阅读(48) 评论(0) 推荐(0)

2021年5月21日

1035. Uncrossed Lines

摘要: 两个数组的相同字符之间可以连线且连线不能相交,乍一看就是动态规划。 再仔细想想,发现竟是最长公共子序列。 class Solution { public: int maxUncrossedLines(vector<int>& nums1, vector<int>& nums2) { int m = 阅读全文

posted @ 2021-05-21 15:45 hannah_id 阅读(42) 评论(0) 推荐(0)

2021年5月12日

(一)配置apue.h

摘要: 配置 apue.h 下载源码及解压 注: 如果出现Permission Denied,在命令前加上sudo再执行 先新建一个目录,然后下载 cd /home/ mkdir learnApue cd learnApue wget http://www.apuebook.com/src.3e.tar.g 阅读全文

posted @ 2021-05-12 14:18 hannah_id 阅读(126) 评论(0) 推荐(0)

2021年5月7日

shell脚本入门

摘要: shell中的变量 shell中的算术运算 总结: shell脚本是 由一些按照一定格式组合起来的shell命令 组成。shell脚本不需要编译就可以直接执行,它是边解释边执行的。 脚本格式 脚本的第一行: #!/bin/bash 命令行变量 阅读全文

posted @ 2021-05-07 17:41 hannah_id 阅读(57) 评论(0) 推荐(0)

2021年4月30日

137. Single Number II

摘要: 解法一: map (哈希表) 时间复杂度: O(n) 空间复杂度:O(n) class Solution { public: int singleNumber(vector<int>& nums) { int n = nums.size(); map<int, int> mp; mp.clear() 阅读全文

posted @ 2021-04-30 09:49 hannah_id 阅读(83) 评论(0) 推荐(0)

2021年4月29日

403. Frog Jump

摘要: class Solution { public: bool canCross(vector<int>& stones) { int n = stones.size(); vector<vector<int> > dp(n, vector<int>(n)); dp[0][0] = true; for( 阅读全文

posted @ 2021-04-29 10:43 hannah_id 阅读(26) 评论(0) 推荐(0)

导航