自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

楼上小宇_home

Write the code, Change the world

  • 博客(16)
  • 资源 (11)
  • 收藏
  • 关注

原创 c/c++中的const

关于const能否修改c语言#include <stdio.h>int main() { const int i = 10; //const int i; //错误,const变量必须在定义时初始化 //i=100; //错误,const类型不能修改 int *p = &i; //将i的地址赋值给指针p( 在C中ok) *p = 20; //通过指针修改co...

2018-09-19 00:40:18 5347

原创 c++一些常见的知识点

基础知识int *arr[] 是指针数组,数组中存放的是地址int (*arr)[] 是数组指针,首先它是一个指针,它指向一个数组,即指向数组的指针详解解释看这里

2018-09-18 21:44:56 5565

原创 分析两小段c++代码 关于unsigned运算的坑

代码1#include <stdio.h>#include <iostream>using namespace std;int main(){ unsigned int a = 2, b = 1; cout << a - b << endl; cout << b - a << endl; ...

2018-09-18 21:15:05 5539

原创 二叉树的前序、中序、后序非递归遍历 python实现

前言python中二叉树的定义:class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = None如何使用python建立一个二叉树前序class Solution: def preorderTr...

2018-09-14 10:00:41 5683

原创 linux 命令行分割字符串的几种方法

使用xargsecho '11@22@33' | xargs -d '@' -n 1 echo | sed '$d' 使用awkecho '11@22@33' | awk -F '@' '{for(i=1;i<=NF;i++){print $i;}}'

2018-09-13 09:25:38 10827

原创 c/c++ 如何输入带空格的字符串

前言如题所示c语言情况常规输入#include <stdio.h>int main(){ char str[10] = {0}; scanf("%s", str); printf("%s\n", str); return 0;}testfasdf asfasdfc语言会自动截断输入的空格问题...

2018-09-09 17:08:19 7755

原创 c++的格式化输出

前言在c++中通过格式化输出的库主要是iomanip 主要是对cin,cout之类的一些操纵运算子,比如setfill,setw,setbase,setprecision等等。它是I/O流控制头文件,就像C里面的格式化输出一样.以下是一些常见的控制函数的:dec 置基数为10 相当于"%d"hex 置基数为16 相当于"%X"oct 置基数为8 相当于"%o"setfill( ...

2018-09-09 15:42:17 7854

原创 二叉树中和为某一值的路径

前言输入一颗二叉树的跟节点和一个整数,打印出二叉树中结点值的和为输入整数的所有路径。路径定义为从树的根结点开始往下一直到叶结点所经过的结点形成一条路径。(注意: 在返回值的list中,数组长度大的数组靠前)python 非递归做法利用后序遍历的非递归思想class Solution: # 返回二维列表,内部每个列表表示找到的路径 def FindPath(sel...

2018-09-08 14:28:32 5346

原创 判断某数组是不是二叉树的前序遍历序列 python递归

codeclass Solution: def VerifySquenceOfBST(self, sequence): # write code here if len(sequence) <= 0 or sequence == None: return False length = len(sequence...

2018-09-07 15:33:03 5737

原创 判断某数组是不是二叉树的后序遍历序列 python递归与非递归解法

python 递归class Solution: def VerifySquenceOfBST(self, sequence): # write code here if len(sequence) <= 0 or sequence == None: return False length = len(s...

2018-09-07 15:19:40 5647

原创 判断入栈顺序和出栈顺序是否合理 python实现

前言输入两个整数序列,第一个序列表示栈的压入顺序,请判断第二个序列是否可能为该栈的弹出顺序。假设压入栈的所有数字均不相等。例如序列1,2,3,4,5是某栈的压入顺序,序列4,5,3,2,1是该压栈序列对应的一个弹出序列,但4,3,5,1,2就不可能是该压栈序列的弹出序列。(注意:这两个序列的长度是相等的)解题思路1.我们申请一个的新的列表stack,依次将入栈序列中的值加入 2.每次...

2018-09-04 20:52:23 8070

原创 顺时针打印矩阵 python

前言题目:输入一个矩阵,按照从外向里以顺时针的顺序依次打印出每一个数字,例如,如果输入如下矩阵: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 则依次打印出数字1,2,3,4,8,12,16,15,14,13,9,5,6,7,11,10.思路1.我们依次打印每一行 2.打印完了之后,我们需要删除第一行 3.然后我们需要把整个矩阵逆时针旋转一下,让...

2018-09-04 16:03:38 5615

原创 翻转二叉树 c语言实现 递归 栈 队列

前言题目比较好理解,就是翻转二叉树代码c语言实现#include<stdio.h>#include<stdlib.h>#include<string.h>#define N 105struct TreeNode{ int val; TreeNode* left; TreeNo...

2018-09-04 13:54:24 6899

原创 计算最长公共子序列

前言什么是最长公共子序列呢?好比一个数列 S,如果分别是两个或多个已知数列的子序列,且是所有符合此条件序列中最长的,则S 称为已知序列的最长公共子序列。如何解决通用的解法用动态规划,如何使用动态规划解题,晚上已经有很多不同人的答案了,推荐几个: 程序员编程艺术第十一章:最长公共子序列(LCS)问题 算法导论—–最长公共子序列LCS(动态规划)我的代码c语言#in...

2018-09-03 20:42:27 5487

原创 判断两个树是否相等和判断tree1是否包含tree2 python实现

判断两个树是否相等def equal(node_a, node_b): """ 判断两个树是否相等 :param node_a: :param node_b: :return: """ if not node_a and not node_b: return True elif not node_a and ...

2018-09-02 21:46:18 5869

原创 字符串全排列的问题 python和c语言实现

前言这是一个的经典的问题 设计一个算法,输出一个字符串字符的全排列。 比如,String = “abc” 输出是”abc”,”bac”,”cab”,”bca”,”cba”,”acb”解法从集合依次选出每一个元素,作为排列的第一个元素,然后对剩余的元素进行全排列,如此递归处理; 比如:首先我要打印abc的全排列,就是第一步把a 和bc交换(得到bac,cab),这需要一个for循...

2018-09-01 21:18:27 6391

银行笔试-计算机知识部分_sty修改.pdf

银行笔试-Java基础知识必备,java常用基础知识,java学习资料

2019-10-05

item_seleted

QT中使用rubberband橡皮筋等方法进行选中多个物体,展示效果如下: https://img-blog.csdnimg.cn/20190122112611529.gif

2019-01-22

python画小猪佩奇

用python快速画出小猪佩奇,具体的效果展示可以看这里:https://img-blog.csdnimg.cn/20190120103016165.gif

2019-01-20

Box2D_v2.1.2已经编译好的文件

Box2D is a 2D physics engine for games. For help with Box2D, please visit http://www.box2d.org. There is a forum there where you may post your questions.

2018-11-07

Box2D_v2.1.2

Box2D_v2.1.2 Box2D is a 2D physics engine for games. For help with Box2D, please visit http://www.box2d.org. There is a forum there where you may post your questions.

2018-11-07

2018 Google kickstart Problem A. Planet Distance 输入数据

2018 Google kickstart Problem A. Planet Distance 输入数据

2018-05-27

笨方法学python3 Learn Python 3 the Hard Way

笨方法学Python号称最经典的python入门书籍现在出python3版本的了,你还不快来学? 英文高清带书签版本 You Will Learn Python 3! Zed Shaw has perfected the world’s best system for learning Python 3. Follow it and you will succeed—just like the millions of beginners Zed has taught to date! You bring the discipline, commitment, and persistence

2018-04-06

用python进行数据分析 第二版 Python for Data Analysis, 2nd Edition

用python进行数据分析 第二版 英文高清带书签版本 Get complete instructions for manipulating, processing, cleaning, and crunching datasets in Python. Updated for Python 3.6, the second edition of this hands-on guide is packed with practical case studies that show you how to solve a broad set of data analysis problems effectively. You’ll learn the latest versions of pandas, NumPy, IPython, and Jupyter in the process. Written by Wes McKinney, the creator of the Python pandas project, this book is a practical, modern introduction to data science tools in Python. It’s ideal for analysts new to Python and for Python programmers new to data science and scientific computing. Data files and related material are available on GitHub. Use the IPython shell and Jupyter notebook for exploratory computing Learn basic and advanced features in NumPy (Numerical Python) Get started with data analysis tools in the pandas library Use flexible tools to load, clean, transform, merge, and reshape data Create informative visualizations with matplotlib Apply the pandas groupby facility to slice, dice, and summarize datasets Analyze and manipulate regular and irregular time series data Learn how to solve real-world data analysis problems with thorough, detailed examples

2018-04-06

SQL与关系数据库理论:如何编写健壮的SQL代码 第二版

对于数据库管理与开发人员来说,使用 SQL 时会到处遭遇困难和陷阱。只有深入理解关系理论,并将理论应用于实践,才能避免这些困难和陷阱。 《SQL 与关系数据库理论:如何编写健壮的 SQL 代码(第 2 版)》作者深入阐述了关系理论,以严谨的态度对 SQL 与关系理论进行详尽而深入的对比、讨论和思考,并且使用大量示例和练习展示怎样才能将关系理论正确地应用到 SQL 中,得到健壮的 SQL 代码,为高级数据库开发人员提供大量常见 SQL 问题的解决之道。

2018-02-26

学习 Go 语言(Golang)

学习 Go 语言(Golang),简单易懂的Go语言教程,让你分分钟学会GO语言

2018-01-26

nginx的1.12.2 下 载

nginx-1.12.2的下载应用,免安装,即可运行。 nginx-1.12.2的下载应用,免安装,即可运行

2018-01-26

空空如也

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

TA关注的人

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