
C++
文章平均质量分 75
天风海雨
将来的你,一定会感谢现在拼命努力的自己
展开
-
C++ Primer(第五版)读书笔记(1)
从今天起,2018年2月27日,开始重读《C++ Primer(第五版中文)》,将思考和体会、问题均记录在此。第1章 开始1.1 编写一个简单的C++程序1.1.1 编译、运行程序 编写好程序后,我们可以使用命令行界面或者IDE来运行编译器,对程序进行编译。如果使用命令行界面,那么在UNIX中是在外壳程序窗口,在Linux中是终端,在Windows中是命令提示符窗口,假设我们的mai...原创 2018-02-27 08:56:54 · 631 阅读 · 0 评论 -
LeetCode刷题(2)——AddTwoNumbers
1、题目:You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and ret...原创 2018-03-18 07:59:29 · 328 阅读 · 0 评论 -
LeetCode刷题(3)——Longest Substring Without Repeating Characters
1、题目:Given a string, find the length of the longest substring without repeating characters.Examples:Given "abcabcbb", the answer is "abc", which the length is 3.Given "bbbbb", the answer is "b", with ...原创 2018-03-20 21:37:16 · 285 阅读 · 0 评论 -
C++中int a[10]和int* a=new int[10]]有什么区别
我们常常看见,在图论中,对一个Graph类在初始化的时候,对类的成员变量**arc(邻接矩阵,是一个二维数组,大小是顶点数*顶点数,存储内容为边的权值,而且矩阵的对角线元素均为0),有如下的初始化方法://构造函数Graph_DG::Graph_DG(int vexnum, int edge) { //初始化顶点数和边数 this->vexnum = vexnum; this->...原创 2018-03-05 18:39:14 · 28092 阅读 · 0 评论 -
LeetCode刷题(757)--- Set Intersection Size At Least Two 设置交集大小至少为2
https://leetcode-cn.com/problems/set-intersection-size-at-least-two/description/https://www.cnblogs.com/grandyang/p/8503476.html转载 2018-06-14 11:10:34 · 681 阅读 · 0 评论 -
LeetCode刷题(756)--- Pyramid Transition Matrix 金字塔转变矩阵
We are stacking blocks to form a pyramid. Each block has a color which is a one letter string, like `'Z'`.我们用一些方块来堆砌一个金字塔,每个方块是仅包含一个字母的字符串,比如"Z"。For every block of color `C` we place not in the bottom...转载 2018-06-14 16:27:01 · 1015 阅读 · 0 评论