两种单链表(没有头节点 和 带有头节点)的创建 及 基本操作(增删改查)

带有头节点: #include "pch.h" #include "pch.h" #include "SingleList.h" #include <iostream> using namespace std; int main(void) { SingleList list; list.create(10); list.print(); cout << "创...
分类: 其他 发布时间: 10-08 23:18 阅读次数: 0

Java 中string与date(日期)格式之间的转换

1.string格式转化为Date对象: //把string转化为date DateFormat fmt =new SimpleDateFormat("yyyy-MM-dd"); Date date = fmt.parse(szBeginTime); test.setStartTime(date);    注意:引入的是:java.text.DateFormat   2.Date格式转化...
分类: 其他 发布时间: 10-08 23:18 阅读次数: 0

将两条有序单链表合成一条链表(两种写法)

整体代码: typedef struct Node { int data; struct Node * next; }Node; class SingleList { Node head; int length; static int I; public: SingleList(); void create(int len); void insert(int index,in...
分类: 其他 发布时间: 10-08 23:18 阅读次数: 0

单链表的反转(转置)

template<class Type> inline void Link<Type>::InverseLink() { Node<Type> * current = head; Node<Type> * next = NULL; Node<Type> * result = NULL; while ( current ) { ...
分类: 其他 发布时间: 10-08 23:18 阅读次数: 0

TortoiseGit因为改变文件夹而报错不能成功推送的解决方法

按照这个弄过之后,就会重新开始,单纯的卸载没有用的
分类: 其他 发布时间: 10-08 23:17 阅读次数: 0

SQL Server 入门 及 基本的操作(数据库的增删改查)

database management system (DBMS)数据管理系统 DataBase Administrator(DBA)数据库数据管理员 一、数据库的基本概念 1、数据模型 1、层次模型 2、网状模型 3、关系模型(用表来管理数据) 2、关系型数据库语言 1、数据定义语言(DDL) 语句 功能 CREATE ...
分类: 其他 发布时间: 10-08 23:17 阅读次数: 0

Git入门(一)

1、用于显示当前目录:pwd   2、把这个目录变成Git可以管理的仓库:git init   3、目录默认是隐藏的可以看见:ls -ah   4、用命令告诉Git,把文件添加到仓库:git add   5、把文件提交到仓库:git commit git commit命令,-m后面输入的是本次提交的说明,可以输入任意内容,当然最好是有意义的,这样你就能从历史记录里方便地找到改动记...
分类: 其他 发布时间: 10-08 23:17 阅读次数: 0

Git入门(二)

1、远程库克隆到本地:git clone SSH   2、分支的创建 与 基本的使用 下面开始实战。 首先,我们创建dev分支,然后切换到dev分支: $ git checkout -b devSwitched to a new branch 'dev' git checkout命令加上-b参数表示创建并切换,相当于以下两条命令: $ git bran...
分类: 其他 发布时间: 10-08 23:17 阅读次数: 0

数据库(My SQL 、SQL Server)的数据类型

  数字类型 整形 浮点/定点型 日期和时间类型 字符类型 字符集与编码 CHAR和VARCHAR BINARY和VARBINARY BLOB和TEXT ENUM和SET类型 选择合适的数据类型 参考资料 数字类型 整形 在整数类型中,按照取值范围和存储方式不同,分为tinyint、smallint、mediumint、int和bigint这 5...
分类: 其他 发布时间: 10-08 23:16 阅读次数: 0

数据结构预算法 循环列队 C / C++

#pragma once typedef struct Queue { int * m_Queue; int m_length; int m_capacity; }SqQueue; class RoundQueue { SqQueue queue; int m_head; int m_tail; public: RoundQueue(int capacity);//InitQue...
分类: 其他 发布时间: 10-08 23:16 阅读次数: 0

Week2

Week2 Array question source: Container With Most Water question description Given n non-negative integers a1, a2, …, an , where each represents a point at coordinate (i, ai). n vertical lines ar...
分类: 其他 发布时间: 10-08 23:15 阅读次数: 0

Week4

Week4(2) 上周犯了个小错误,在写第3周的博客时,不小心直接在第2周的博客上改了,然后第2周的博客直接被第3周的覆盖了,所以这周写2篇补回来。 Graph question source: Is Graph Bipartite? question description Given an undirected graph, return true if and only if it is b...
分类: 其他 发布时间: 10-08 23:14 阅读次数: 0

surrounded-regions leetcode C++

Given a 2D board containing'X'and'O', capture all regions surrounded by'X'. A region is captured by flipping all'O's into'X's in that surrounded region . For example, X X X X X O O X X X O X X O X ...
分类: 其他 发布时间: 10-08 23:14 阅读次数: 0

triangle leetcode C++

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], [3,4], [6,5,7], [4,1,8,3...
分类: 其他 发布时间: 10-08 23:14 阅读次数: 0

valid-palindrome leetcode C++

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 palindrome. "race a car"is not a palind...
分类: 其他 发布时间: 10-08 23:13 阅读次数: 0

word-break-ii leetcode C++

Given a string s and a dictionary of words dict, add spaces in s to construct a sentence where each word is a valid dictionary word. Return all such possible sentences. For example, given s ="catsan...
分类: 其他 发布时间: 10-08 23:13 阅读次数: 0

word-break leetcoder C++

Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words. For example, given s ="leetcode", dict =["leet", "cod...
分类: 其他 发布时间: 10-08 23:13 阅读次数: 0

word-ladder leetcoder C++

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 time Each intermediate word mu...
分类: 其他 发布时间: 10-08 23:13 阅读次数: 0

TypeError: 'encoding' is an invalid keyword argument for this function 解决Python 2.7

在python2.7中这样调用代码 open('file/name.txt','r',encoding= 'utf-8').read() 会出现 TypeError: 'encoding' is an invalid keyword argument for this function 这样的错误 需要将代码修改为 import io io.open('file/name.txt...
分类: 其他 发布时间: 10-08 23:12 阅读次数: 0

Python matplotlib 概率论与数理统计 伯努利分布 二项分布

Python 代码实现 二项分布 import numpy as np import matplotlib.pyplot as plt import math from scipy import stats n = 100 p = 0.05 k = np.arange(0,n) binomial = stats.binom.pmf(k,n,p) plt.plot(k,binomial,'...
分类: 其他 发布时间: 10-08 23:12 阅读次数: 0
今日推荐