自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(223)
  • 资源 (6)
  • 收藏
  • 关注

原创 软考高级+系统架构设计师教程+第二版新版+电子版pdf

上篇为综合知识,介绍了系统架构设计师应熟练掌握的基本知识,主要包括绪论、计算机系统、信息系统、信息安全技术、软件工程、数据库设计、系统架构设计、系统质量属性与架构评估、软件可靠性、软件架构的演化和维护、未来信息综合技术等诸多基本知识和方法。下篇为案例分析,分门别类地详细介绍了系统架构设计的相关理论、方法和案例分析,主要包括信息系统架构、层次式架构、云原生架构、面向服务架构、嵌入式系统架构、通信系统架构、安全架构和大数据架构等诸多设计理论和案例。第16章 嵌入式系统架构设计理论与实践。

2023-09-24 18:56:06 1731 4

原创 【Ubuntu git clone命令报错】fatal: unable to access ‘https://github.com/XXX‘: gnutls_handshake() failed:

Ubuntu git clone 命令报错:Cloning into 'XXX'...fatal: unable to access 'https://github.com/XXX': gnutls_handshake() failed:The TLS connection was non-properly terminated.

2023-03-17 00:34:59 3123 3

原创 Ubuntu中安装软件时出现报错Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend)……

Ubuntu中安装软件时出现报错Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend)……

2023-03-17 00:10:32 731

原创 C++中的命名空间

C++中命名空间的概念

2023-03-07 22:41:54 87

原创 C/C++中的“static”

static修饰全局变量、函数和局部变量时的相关含义

2023-03-07 22:13:59 166

原创 [LeetCode Python3] 396. Rotate Function + 暴力 + 错位相减

396. Rotate Function暴力 时间复杂度O(n*n)按照计算规则,一步一步来class Solution: def maxRotateFunction(self, nums: List[int]) -> int: size, res = len(nums), -float('inf') for i in range(size): tmp = 0 for j in range(size):

2021-04-27 20:14:08 110

原创 [LeetCode Python3]395. Longest Substring with At Least K Repeating Characters +递归

395. Longest Substring with At Least K Repeating Charactersclass Solution: def longestSubstring(self, s: str, k: int) -> int: if len(s) < k: return 0 for c in set(s): # 若某个字符c的个数大于0且小于k,那么包含它的子串必然不符合要求,

2021-04-26 19:44:51 174

原创 [LeetCode Python3] 394. Decode String + 递归

394. Decode Stringclass Solution: def decodeString(self, s: str) -> str: table = "0123456789" size = len(s) index = 0 res = "" while index < size: if s[index] in table: # 若遇到数字即进入解码

2021-04-22 17:42:39 136

原创 [LeetCode Python3] 393. UTF-8 Validation +位处理

393. UTF-8 Validationsymple & 128 == 0 表示symple必为 0xxx xxxx(symple & 128 == 128) and (symple & 64 == 0) 表示symple必为 10xx xxxx(symple & 192 == 192) and (symple & 32 == 0) 表示symple必为 110x xxxx(symple & 224 == 224) and (symple &

2021-04-21 21:15:42 79

原创 [LeetCode Pythons] 388. Longest Absolute File Path+O(n)

#388. Longest Absolute File Path算法搬运工解题思路使用一个数组prefixSum,保存遍历过程中,已知层级的前缀字符串数。如前缀为aaa/bb/cc/则prefixSum = [0, 4, 7, 10], 即aaa/的长度,aaa/bb/的长度,aaa/bb/cc/的长度。在遍历每行数据时:保存当前行的层级level,也就是\t的数量。如果当前行为文件: 我们只要将当前文件名的长度,加上之前层级的字符串长度就行。如果当前行为文件夹: 如果层级比数组长度大,

2021-04-12 20:09:30 74

原创 [LeetCode Python3] 384. Shuffle an Array +洗牌算法

384. Shuffle an Array暴力重排class Solution: def __init__(self, nums: List[int]): self.nums = nums[:] self.tmp = nums[:] def reset(self) -> List[int]: """ Resets the array to its original configuration and return

2021-04-05 11:03:56 103

原创 [LeetCode Python3] 382. Linked List Random Node + 水塘抽样 +大数据流,等概率抽样

382. Linked List Random Nodeclass Solution: def __init__(self, head: ListNode): self.head = head def getRandom(self) -> int: count = 0 reserve = self.head.val cur = self.head while cur: count

2021-04-05 09:56:41 103

原创 [LeetCode Python3]334. Increasing Triplet Subsequence + 暴力搜索 + 双指针

334. Increasing Triplet Subsequence暴力搜索class Solution: def increasingTriplet(self, nums: List[int]) -> bool: size = len(nums) if size < 3: return False for i in range(size-2): for j in range(i+1,

2021-02-07 15:26:20 76

原创 [LeetCode Python3] 318. Maximum Product of Word Lengths + 位掩码

318. Maximum Product of Word Lengthsfrom collections import defaultdictclass Solution: def maxProduct(self, words: List[str]) -> int: hashmap = defaultdict(int) bit_number = lambda ch: ord(ch) - ord('a') for word in words

2021-02-07 14:40:50 101

原创 332. Reconstruct Itinerary +欧拉通路

332. Reconstruct Itineraryclass Solution: def findItinerary(self, tickets: List[List[str]]) -> List[str]: def dfs(curr: str): while vec[curr]: tmp = heapq.heappop(vec[curr]) dfs(tmp) s

2021-02-03 16:48:07 113

原创 [LeetCode Python3] 260. Single Number III +集合

260. Single Number III集合的删除、添加、查找的时间复杂度均为O(1)Time:O(n); Space: O(3)class Solution: def singleNumber(self, nums: List[int]) -> List[int]: res = set() for num in nums: if num in res: res.remove(num)

2021-01-20 19:34:41 65

原创 [LeetCode Python3]274/275. H-Index I/II

275. H-Index IIO(n)class Solution: def hIndex(self, citations: List[int]) -> int: res = 0 for index in range(len(citations)): if citations[len(citations)-1-index] >= index + 1: res = index + 1

2021-01-20 19:24:07 96

原创 [LeetCode Python3] 240. Search a 2D Matrix II +二分查找

240. Search a 2D Matrix II二维版二分查找class Solution: def searchMatrix(self, matrix: List[List[int]], target: int) -> bool: m, n = len(matrix), len(matrix[0]) def helper(rlo, rhi, clo, chi): if rlo >= rhi or clo >= ch

2021-01-16 16:40:39 73

原创 [LeetCode Python3]222. Count Complete Tree Nodes +完全二叉树/满二叉树

222. Count Complete Tree Nodes满二叉树、完全二叉树、平衡二叉树、最优二叉树class Solution: def countNodes(self, root: TreeNode) -> int: def getheight(root): # 得到完全二叉树的高度 height = 0 while root: height += 1

2021-01-12 19:47:06 61

原创 [LeetCode Python3] 217/219/220. Contains Duplicate I/II/III

217. Contains Duplicatesolution1:统计每个元素出现的个数,当个数超过1时说明重复class Solution: def containsDuplicate(self, nums: List[int]) -> bool: dic = collections.defaultdict(int) for num in nums: dic[num] += 1 for key, value in

2021-01-11 21:33:09 94

原创 [LeetCode Python3] 209. Minimum Size Subarray Sum + O(n) + 滑动窗口

209. Minimum Size Subarray Sum滑动窗口class Solution: def minSubArrayLen(self, s: int, nums: List[int]) -> int: left, right, size = 0, 0, len(nums) # left, right分别记录滑动窗口的左右边界,左闭右开 subsum, minlen = 0, size+1 # minlen的初始化用size+1代替正无穷

2021-01-07 11:37:21 81 1

原创 [LeetCode Python3] 207. Course Schedule+ DFS

207. Course Schedule该题本质是判断图中是否存在环,这里采用深度优先搜索求解Solution:class Solution: def canFinish(self, numCourses: int, prerequisites: List[List[int]]) -> bool: def dfs(i): visited[i] = 1 if i in graph: for t

2021-01-05 19:54:25 78 1

原创 [LeetCode Python3] 199. Binary Tree Right Side View +层次遍历

199. Binary Tree Right Side View该题的本质还是层次遍历,只不过仅把每层的最右边元素记录下来solution:class Solution: def rightSideView(self, root: TreeNode) -> List[int]: if not root: return [] que = [root] que1 = [] res = []

2021-01-04 19:33:03 65

原创 [LeetCode Python3] 187. Repeated DNA Sequences

187. Repeated DNA Sequencesclass Solution: def findRepeatedDnaSequences(self, s: str) -> List[str]: dictionary = dict() for i in [s[x : x + 10] for x in range(len(s) - 9)]: dictionary[i] = dictionary.get(i, 0) + 1

2021-01-03 19:57:04 64

原创 [LeetCode Python3] 173. Binary Search Tree Iterator +由中序遍历程序改造 + Time:O(1),Space:O(h)

173. Binary Search Tree Iterator由题意迭代器要按升序逐一迭代访问,因为二叉搜索树的中序遍历序列就是严格按升序排列的由此先给出二叉树的中序遍历程序中序遍历程序:class Solution: def inorderTraversal(self, root: TreeNode) -> List[int]: if not root: return [] res = [] stack = [

2021-01-01 16:43:22 89

原创 [LeetCode Python3] 150. Evaluate Reverse Polish Notation

150. Evaluate Reverse Polish Notation参考资料:如何用栈求表达式的值Solution:class Solution: def evalRPN(self, tokens: List[str]) -> int: operators = ["+", "-", "*", "/"] stack = [] for token in tokens: if token in operators:

2020-12-29 19:28:50 83

原创 [LeetCode Python3] 144. Binary Tree Preorder Traversal +递归+迭代

144. Binary Tree Preorder Traversal递归class Solution: def preorderTraversal(self, root: TreeNode) -> List[int]: if not root: return [] res = [root.val] if root.left: res += self.preorderTraversal(root

2020-12-27 15:57:18 64 1

原创 [LeetCode Python3]139. Word Break +暴力递归 + 带备忘录的递归

暴力递归class Solution: def wordBreak(self, s: str, wordDict: List[str]) -> bool: def helper(tmps): if not tmps: # tmps为空字符串是返回真 return True for i in range(1, len(tmps)+1): if tmps[:i]

2020-12-26 20:51:43 117

原创 [LeetCode Python3] 134. Gas Station+暴力遍历+简单剪枝

134. Gas Stationclass Solution: def canCompleteCircuit(self, gas: List[int], cost: List[int]) -> int: size = len(gas) for index in range(size): #遍历所有站,只要当前油站的油量大于该站到下一站要耗的油量时才有可能作为起点 if gas[index] >= cost[index]:

2020-12-25 21:17:31 105

原创 [LeetCode Python3] 131. Palindrome Partitioning +递归+划分子问题

131. Palindrome PartitioningSolution:class Solution: def validpalindrome(self, s): if len(s) == 1: return True lo, hi = 0, len(s)-1 while lo < hi: if s[lo] != s[hi]: return False

2020-12-23 21:16:18 60

原创 [LeetCode Python3] 129. Sum Root to Leaf Numbers +递归

129. Sum Root to Leaf Numbers解题思路:二叉树首先往递归上想,标准模板:def fun(root,..): if not root: return .. if root.left: fun(root.left,..) if root.right: fun(root.right,..) return ..本题解法:class Solution: def sumNumbers(self, root: TreeNode) -> int:

2020-12-22 20:22:53 80

原创 C语言项目案例(一):实现贪吃蛇+双向链表+详细注释

实现贪吃蛇+双向链表+详细注释代码如下:main.c#include "snake.h"int main(){ initSnake(); initMap(); HideCursor(); gameRun(); return 0;}snake.h#include <stdio.h>#include <stdlib.h>#include <Windows.h>#include <conio.h>

2020-11-28 15:28:39 849

原创 C语言分配内存:malloc()和free()

C语言分配内存:malloc和freemalloc()和free()函数介绍malloc()函数原型:free()函数:动态分配变长数组free()的重要性,内存泄露补充知识--存储类别malloc()和free()函数介绍malloc()和free()的原型都在stdlib.h头文件中,通常要配套使用malloc()用来动态分配内存,free()用来释放内存。malloc()函数原型:void *malloc( size_t size );malloc()函数接收的参数:所需的内存字节数;返回

2020-11-20 11:59:57 490

原创 C语言中新版本中scanf_s函数用于输入字符串时的问题

C语言中新版本中scanf_s函数用于输入字符串时的问题解决办法:在数组名后加个界限如: scanf_s("%s", exp, MAX_LEN); # exp[MAX_LEN]

2020-11-20 10:38:02 572

原创 [LeetCode Python3] 127. Word Ladder + BFS +双向BFS

127. Word Ladder + BFS +双向BFS1、BFSfrom collections import defaultdictclass Solution(object): def ladderLength(self, beginWord, endWord, wordList): """ :type beginWord: str :type endWord: str :type wordList: List[str]

2020-10-26 16:17:55 122

原创 [LeetCode Python3] 97. Interleaving String + 暴力递归 + 带备忘录的递归 + 动态规划

97. Interleaving String暴力递归# V1 暴力class Solution: def isInterleave(self, s1: str, s2: str, s3: str) -> bool: size1, size2, size3 = len(s1), len(s2), len(s3) if size1 + size2 != size3: # 当s1和s2的长度加起来不等于s3的长度,肯定无法交错组成

2020-10-22 10:46:33 112

原创 [LeetCode Python3] 103. Binary Tree Zigzag Level Order Traversal + 两种解法

103. Binary Tree Zigzag Level Order TraversalS1:# V1 class Solution: def zigzagLevelOrder(self, root: TreeNode) -> List[List[int]]: if not root: return None res, restmp = [], [] stack0, stack1 = [root], []

2020-10-20 18:58:34 146

原创 [LeetCode Python3] 94. Binary Tree Inorder Traversal +二叉树前序遍历+递归解法+迭代解法

94. Binary Tree Inorder TraversalS1: 递归class Solution: def inorderTraversal(self, root: TreeNode) -> List[int]: if not root: return [] res = [] if root.left: res += self.inorderTraversal(root.left)

2020-10-19 21:54:57 111

原创 [LeetCode Python3] 93. Restore IP Addresses + 回溯 + 注释详解

93. Restore IP Addresses# Runtime: 20 ms, faster than 99.80%; Memory Usage: 14.2 MB, less than 100.00%class Solution: def restoreIpAddresses(self, s: str) -> List[str]: res = [] def trackback(track, index, size): if ind

2020-10-19 21:23:08 111

原创 [LeetCode Python3] 89. Gray Code +格雷码与二进制码的转换

89. Gray Code# Runtime: 24 ms, faster than 97.33%; Memory Usage: 14.3 MB, less than 6.42%class Solution: def grayCode(self, n: int) -> List[int]: res = [] for i in range(2**n): tmp = i >> 1 ^ i # 右移一位然后与本身异或

2020-10-19 10:47:51 130

直接序列扩频通信系统_VHDL代码及文档.zip

使用VHDL语言进行直接序列扩频通信系统的仿真,实现信源产生、解扰、交织、直扩、BPSK调制、解调、相关、解交织、解扰、判决等一系列功能。PS:有同学反映文件损坏,又重新上传了一遍

2019-02-21

MATLAB通信系统仿真代码

MATLAB数字通信仿真(0/1数据产生,16QAM调制,插值,成型滤波,匹配滤波,采样,16QAM解调,判决,误码率计算)

2019-01-26

4PSK和QPSK调制及成型滤波sinc

数字通信仿真MATLAB,4PSK和QPSK调制及成型滤波器sinc

2019-01-26

【MATLAB】利用FFT分析其频谱

利用MATLAB生成正弦信号并利用FFT对其频谱进行分析,并比较不同情况的异同

2019-01-26

【MATLAB代码】随机信号和高斯信号的生成及概率密度函数PDF的分析

利用MATLAB进行随机信号和高斯信号的生成及概率密度函数PDF的分析

2019-01-26

多线程优先级示例_赛马

多核课程 多线程优先级示例_赛马 通过例子来演示多线程优先级

2017-12-04

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除