- 博客(116)
- 资源 (13)
- 收藏
- 关注
原创 C++ STL 序列式容器
C++ STL 序列式容器什么是序列式容器序列容器就是以线性序列方法来存储元素的容器,它对元素的顺序和存放顺序相关,具体的容器主要有5种。分别是:1、array<T,N> 数组容器,特点是长度固定,可以随机存取;2、vector< T > 向量容器,特点是长度不固定,可以自动扩容,一般在队尾进行元素的增删,可以随机存取;3、deque< T >双向队列...
2019-08-07 00:26:29
459
原创 C++ STL String类(2)
C++ STL String类(2)string内容的修改一般来说 有很多种方法可以去修改string,例如assign(),operator=,erase(),swap(),insert(),append()等等;assign这个函数可以直接给string再重新赋值,例如:#include <iostream>#include <string>using n...
2019-08-04 23:37:07
447
原创 C++ STL string类
C++ STL string类String简介STL 中只有一个字符串类,即 basic_string,实现管理以’\0’结尾的字符数组,字符类型由模板参数决定。字符类型的性质是由字符特征类(char_traits)定义的:template <class Ch> struct char_traits { }string 作为类出现,其集成的操作函数足以完成多数情况下的需要。...
2019-08-02 00:54:48
429
原创 C++进程资源
C++进程资源什么是资源资源时进程执行任务过程中所使用的硬件设备或者软件材料,资源包括硬盘、RAM、CPU、打印机、显示器、键盘、网卡、文件、程序、数据、动态链接库等等。资源可以是进程在任何给定时间使用的任何东西。硬件资源硬件资源是物理设备,例如CPU,进程使用它来进行数据操纵计算执行等等。此外还有内存RAM、外存ROM、非抢占式打印机、屏幕键盘鼠标等I/O设备。这些I/O资源可以被多...
2019-07-01 00:19:16
2863
原创 C++进程映射
C++进程映射进程片段进程有3个片段,分别是文本片段、堆栈片段、数据片段。进程的地址空间布局是既有物理模型,也有逻辑模型。物理模型是关于具体的真实的资源是怎么一一存放在RAM上的。逻辑模型是一块虚拟出来的内存管理,其在布局的底端有文本片段,接着是数据片段,最后是堆栈片段。逻辑布局使用的是虚拟地址空间,它是一套进程可用可见的一个虚拟地址,映射到具体真实的物理地址上去。而片段又会被分解成...
2019-07-01 00:05:32
417
原创 leetcode之restore-ip-addresses(找出所有字符串中符合条件的IP网址,并返回)
leetcode之restore-ip-addresses(找出所有字符串中符合条件的IP网址,并返回)题目Given a string containing only digits, restore it by returning all possible valid IP address combinations.For example:Given"25525511135",retu...
2019-06-30 23:09:02
404
原创 leetcode之binary-tree-inorder-traversal(二叉树中序遍历)
leetcode之binary-tree-inorder-traversal(二叉树中序遍历)题目Given a binary tree, return the inorder traversal of its nodes’ values.For example:Given binary tree{1,#,2,3},return[1,3,2].Note: Recursive solu...
2019-06-23 23:50:50
1025
原创 leetcode之unique-binary-search-trees-ii(求出1-n数组可以组成的所有BST二叉树)
leetcode之unique-binary-search-trees-ii(求出1-n数组可以组成的所有BST二叉树)题目Given n, generate all structurally unique BST’s (binary search trees) that store values 1…n.For example,Given n = 3, your program shou...
2019-06-23 23:32:31
376
原创 leetcode之unique-binary-search-trees(求长度为n的BST有多少个)
leetcode之unique-binary-search-trees(求长度为n的BST有多少个)题目Given n, how many structurally unique BST’s (binary search trees) that store values 1…n?For example,Given n = 3, there are a total of 5 unique B...
2019-06-23 23:00:17
215
原创 leetcode之interleaving-string(两个子字符串是否组成字符串)
leetcode之interleaving-string(两个子字符串是否组成字符串)题目Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2.For example,Given:s1 =“aabcc”,s2 =“dbbca”,When s3 =“aadbbcbcac”, return...
2019-06-20 23:15:07
253
原创 leetcode之validate-binary-search-tree(判断二叉树是否是BST搜索二叉树)
leetcode之validate-binary-search-tree(判断二叉树是否是BST搜索二叉树)题目Given a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows:The left subtree of a node conta...
2019-06-19 22:40:03
546
原创 leetcode之recover-binary-search-tree(搜索二叉树BST重建)
leetcode之recover-binary-search-tree(搜索二叉树BST重建)题目Two elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure.Note:A solution using O(n ) spac...
2019-06-19 21:06:55
490
原创 leetcode之same-tree(判断两个二叉树是否相等)
leetcode之same-tree(判断两个二叉树是否相等)题目Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical and the nodes ha...
2019-06-18 01:35:29
584
原创 leetcode之symmetric-tree(判断二叉树是否是镜像二叉树)
leetcode之symmetric-tree(判断二叉树是否是镜像二叉树)题目Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric:But the following ...
2019-06-18 01:30:39
1164
原创 leetcode之binary-tree-level-order-traversal(二叉树层次遍历输出)
leetcode之binary-tree-level-order-traversal(二叉树层次遍历输出)题目Given a binary tree, return the level order traversal of its nodes’ values. (ie, from left to right, level by level).For example:Given binary...
2019-06-18 01:17:37
215
原创 leetcode之binary-tree-zigzag-level-order-traversal
leetcode之binary-tree-zigzag-level-order-traversal题目Given a binary tree, return the zigzag level order traversal of its nodes’ values. (ie, from left to right, then right to left for the next level a...
2019-06-18 01:09:49
249
原创 进程状态及转换
进程状态及转换进程状态对进程可以执行有很多种状态,可以创建和销毁,也可以更改优先权,进程状态是进程某时某刻所处的模式或条件。进程的状态也决定了将来的事件以及可能进入的状态。其中、准备执行的进程处于就绪状态。如果某个进程因为等待某个资源或者事件的发送而不能执行,则进入阻塞状态。就绪和阻塞状态是最常见的进程状态之一。只有位于就绪队列内的进程才有资格使用处理器,获得CPU,会按照一定的序列从...
2019-06-17 00:48:07
1733
原创 leetcode之maximum-depth-of-binary-tree(求出二叉树的最大深度)
leetcode之maximum-depth-of-binary-tree(求出二叉树的最大深度)题目Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthes...
2019-06-16 20:21:41
216
原创 leetcode之construct-binary-tree-from-preorder-and-inorder-traversal(给定先序遍历和中序遍历,还原整个二叉树)
leetcode之construct-binary-tree-from-preorder-and-inorder-traversal(给定先序遍历和中序遍历,还原整个二叉树)题目Given preorder and inorder traversal of a tree, construct the binary tree.Note:You may assume that duplicat...
2019-06-16 19:32:13
492
原创 C++什么是进程?进程由什么组成?
C++什么是进程?进程由什么组成?什么是进程进程就是执行中的一段程序,一旦程序被装载到了内存中并准备执行时,它就是一个进程。进程的组成进程具备文本、数据和堆栈片段以及它自己的资源。其中资源可以是文件、对象句柄、设备、信号量、互斥量、管道等等。操作系统中有大量的信息和进程息息相关。这些信息保存在一个叫做进程控制块、或者进程信息块的结构里面。这个结构就是进程对操作系统的表现形式。重要信息定义...
2019-06-12 21:37:08
2344
原创 leetcode之construct-binary-tree-from-inorder-and-postorder-traversal(给定中序遍历和后序遍历,还原二叉树)
leetcode之construct-binary-tree-from-inorder-and-postorder-traversal(给定中序遍历和后序遍历,还原二叉树)题目Given inorder and postorder traversal of a tree, construct the binary tree.Note:You may assume that duplicat...
2019-06-12 00:03:22
260
原创 C++8种常见类类型
C++8种常见类类型前言大部分面向对象开发工作中都应用了以下部分或者全部的基本类别的类:1、具体类(concrete class)2、抽象类(abstract class)3、接口类(interface class)4、节点类(node class)5、支持类(support class)6、域类(domain class)7、应用类(utility class)8、集合和容器...
2019-06-11 21:59:24
11820
原创 基于四阶贝塞尔曲线的无人驾驶可行轨迹规划
基于四阶贝塞尔曲线的无人驾驶可行轨迹规划背景对于实际的无人车系统来说, 轨迹规划需要保证其规划出来的轨迹满足运动学约束、侧滑约束以及执行机构约束。为了生成满足无人车初始状态约束、目标状态约束的局部可行轨迹, 提出了一种基于四阶贝塞尔曲线的轨迹规划方法. 在该方法中, 轨迹规划问题首先被分解为轨形规划及速度规划两个子问题.。为了满足运动学约束、初始状态约束、目标状态约束以及曲率连续约束, 由3 ...
2019-06-10 20:54:41
8795
7
原创 leetcode之binary-tree-level-order-traversal-ii(二叉树按照层次转化为二维数组)
leetcode之binary-tree-level-order-traversal-ii(二叉树按照层次转化为二维数组)题目Given a binary tree, return the bottom-up level order traversal of its nodes’ values. (ie, from left to right, level by level from leaf...
2019-06-09 20:11:36
449
原创 leetcode之convert-sorted-array-to-binary-search-tree(将递增数组转化为BST搜索二叉树)
leetcode之convert-sorted-array-to-binary-search-tree(将递增数组转化为BST搜索二叉树)题目Given an array where elements are sorted in ascending order, convert it to a height balanced BST.题意给定一个递增的连续数组,将其转化为一个BST搜索二叉...
2019-06-07 11:20:48
220
原创 leetcode之convert-sorted-list-to-binary-search-tree(将一个递增链表转化为一个搜索二叉树)
leetcode之convert-sorted-list-to-binary-search-tree(将一个递增链表转化为一个搜索二叉树)题目Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.题意给定一个递增的链表,然后将这...
2019-06-07 10:56:48
213
原创 leetcode之balanced-binary-tree(平衡二叉树判断)
leetcode之balanced-binary-tree(平衡二叉树判断)题目Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the...
2019-06-07 00:33:21
195
原创 leetcode之path-sum
leetcode之path-sum题目Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.For example:Given the below b...
2019-06-06 21:53:37
190
原创 leetcode之path-sum-ii(求所有和为固定值的二叉树路径)
leetcode之path-sum-ii(求所有和为固定值的二叉树路径)题目Given a binary tree and a sum, find all root-to-leaf paths where each path’s sum equals the given sum.For example:Given the below binary tree andsum = 22,re...
2019-06-05 23:01:14
388
原创 leetcode之distinct-subsequences(求字符串中子串的数量)
leetcode之distinct-subsequences(求字符串中子串的数量)题目Given a string S and a string T, count the number of distinct subsequences of T in S.A subsequence of a string is a new string which is formed from the o...
2019-06-05 20:23:39
917
原创 leetcode之populating-next-right-pointers-in-each-node-ii
leetcode之populating-next-right-pointers-in-each-node-ii题目Follow up for problem “Populating Next Right Pointers in Each Node”.What if the given tree could be any binary tree? Would your previous sol...
2019-06-05 19:39:37
171
原创 基于贝塞尔曲线的变道轨迹规划
基于贝塞尔曲线的变道轨迹规划车辆的换道与超车是驾驶员常见的驾驶操作之一,无人驾驶车辆在行驶过程中也会频繁的面临此工况,车辆行驶过程中必须根据行驶环境中车车之间的相对速度与距离,以及车辆周边其他环境的变化信息,相应做出调整进而完成驾驶要求。在这个过程中,车辆必须对安全换道和超车的通过性做出准确评估,从而使车辆安全的运行。因此,无人车的轨迹规划是保证车辆安全行驶的重要组成部分。...
2019-06-04 19:36:33
9631
5
原创 leetcode之pascals-triangle(杨辉三角-1)
leetcode之pascals-triangle(杨辉三角-1)题目Given numRows, generate the first numRows of Pascal’s triangle.For example, given numRows = 5,Return题意给定一个index k,返回高度为k的杨辉三角矩阵。解题思路直接按照杨辉三角的来源规则来就好,从上往下依次计...
2019-06-03 23:14:56
189
1
原创 leetcode之pascals-triangle-ii(杨辉三角)
leetcode之pascals-triangle-ii(杨辉三角)题目Given an index k, return the k th row of the Pascal’s triangle.For example, given k = 3,Return[1,3,3,1].Note:Could you optimize your algorithm to use only O(k...
2019-06-03 22:19:40
187
原创 leetcode之pascals-triangle-ii(杨辉三角)
leetcode之pascals-triangle-ii(杨辉三角)题目Given an index k, return the k th row of the Pascal’s triangle.For example, given k = 3,Return[1,3,3,1].Note:Could you optimize your algorithm to use only O(k...
2019-06-03 22:19:08
150
原创 leetcode之triangle(动态规划)
leetcode之triangle(动态规划)题目Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the following triangle[[2],...
2019-06-02 20:10:54
300
原创 How Adaptive AUTOSAR Enables Autonomous Driving
How Adaptive AUTOSAR Enables Autonomous DrivingSven Flake, Product Engineer Virtual Validation, dSPACE GmbHIn my last post, I discussed virtual ECUs, and I stressed AUTOSAR a lot as a basis for easi...
2019-05-25 10:06:32
801
原创 leetcode之binary-tree-maximum-path-sum
leetcode之binary-tree-maximum-path-sum题目Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the below binary tree,return 6;题意给出一...
2019-05-23 00:51:11
208
原创 leetcode之valid-palindrome(判断是否为回文字符
leetcode之valid-palindrome(判断是否为回文字符串)题目Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example,"A man, a plan, a canal: Panama"is a...
2019-05-22 21:45:04
304
原创 leetcode之word-ladder
leetcode之word-ladder题目Given two words (start and end), and a dictionary, find the length of shortest transformation sequence from start to end, such that:Only one letter can be changed at a timeEa...
2019-05-21 23:23:58
449
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人