- 博客(15)
- 收藏
- 关注
原创 DES加密算法Golang实现
DES介绍数据加密标准(英语:Data Encryption Standard,缩写为 DES)是一种对称密钥加密块密码算法,1976年被美国联邦政府的国家标准局确定为联邦资料处理标准(FIPS),随后在国际上广泛流传开来。它基于使用56位密钥的对称算法。(来自wikipedia)下面介绍一下对称加密和非对称加密的概念:对称密钥加密(Symmetric-key algorithm) 又称为...
2018-10-28 13:25:02 2219 2
原创 Git配置及使用
git 配置git config --global user.name "Your Name"git config --global user.email "YourEmail@example.com"配置ssh key首先查看C:\users\username\.ssh中是否有以下文件如果没有的话,使用git bash或者cmd等输入ssh-keygen -t rsa -...
2018-10-27 23:14:43 117
原创 安卓开发环境搭建
下载安装开发工具安装jdk,配置环境变量,确保java和javac可正常使用android studio安装包sdk manager 安装包更具提示安装android studio安装sdk manager,然后安装所需的相应安装包配置Android studio安装成功之后,生成项目hello world,更改build.gradle配置文件,配置阿里...
2018-10-27 23:13:02 159
原创 leetcode | 72. Edit Distance
题目Given two words word1 and word2, find the minimum number of operations required to convert word1 to word2.You have the following 3 operations permitted on a word:Insert a characterDelete a char...
2018-10-26 15:00:43 319
原创 leetcode | 32.Longest Valid Parentheses
题目Given a string containing just the characters ‘(’ and ‘)’, find the length of the longest valid (well-formed) parentheses substring.Example 1:Input: "(()"Output: 2Explanation: The longest valid...
2018-10-25 17:58:29 135
原创 leetcode | 95. Unique Binary Search Trees Ⅱ
题目Given an integer n, generate all structurally unique BST’s (binary search trees) that store values 1 … n.Example:Input: 3Output:[ [1,null,3,2], [3,2,null,1], [3,1,null,null,2], [2,1,3],...
2018-10-20 22:38:06 197
原创 leetcode | 765. Couples Holding Hands
题目N couples sit in 2N seats arranged in a row and want to hold hands. We want to know the minimum number of swaps so that every couple is sitting side by side. A swap consists of choosing any two peo...
2018-10-20 20:28:55 299
原创 leetcode | 685. Redundant Connection Ⅱ
题目In this problem, a rooted tree is a directed graph such that, there is exactly one node (the root) for which all other nodes are descendants of this node, plus every node has exactly one parent, ex...
2018-10-19 21:58:25 323
原创 leetcode | 684. Redundant Connection
题目In this problem, a tree is an undirected graph that is connected and has no cycles.The given input is a graph that started as a tree with N nodes (with distinct values 1, 2, …, N), with one additi...
2018-10-15 14:33:13 268
原创 leetcode--207.Course Schedule
问题There are a total of n courses you have to take, labeled from 0 to n-1.Some courses may have prerequisites, for example to take course 0 you have to first take course 1, which is expressed as a pa...
2018-10-14 18:17:08 227
原创 Golang | flag & pflag介绍
flag命令行语法命令行语法主要有以下几种形式-flag //只支持bool类型(加上该参数,解析值为true)-flag=x-flag x //只支持非bool类型以上语法对于一个或两个‘-’号,效果是一样的。常用函数flag.String(), flag.Bool(), flag.Int(), flag.Float64() 返回对应类型的指针:func Xxx(name ...
2018-10-12 23:12:44 4452
原创 CentOS安装虚拟打印机
Cups和Cups-PDF首先,介绍一下通用Unix打印系统CUPS(Common UNIX Printing System),CUPS是Fedora Core3中支持的打印系统,主要使用IPP(Internet Printing Protocol)来管理打印工作及队列,也指出LDP以及AppSocket等通讯协议(具体介绍参见百度/谷歌)。然后,介绍一下Cups-PDF:This sof...
2018-10-12 12:58:14 3446 1
原创 服务计算 | Selpg Golang实现
文章目录selpg介绍命令行准则输入输出错误输出执行命令行参数selpg参数介绍Golang实现数据结构参数解析校验参数处理命令输入readFile函数程序测试selpg介绍本文介绍开发selpg(SELect PaGes),一个类似于cat,ls,pr等标准命令的Linux命令行实用程序。selpg允许用户指定从输入文本抽取的页的范围,这些输入文本可以来自文件或者另一个进程,然后将输入进行打...
2018-10-12 09:07:09 528 1
原创 leetcode--785. Is Graph Bipartite?
问题Given an undirected graph, return true if and only if it is bipartite.Recall that a graph is bipartite if we can split it’s set of nodes into two independent subsets A and B such that every edge i...
2018-10-06 18:05:38 402
原创 leetcode--332. Reconstruct Itinerary题解
题目Given a list of airline tickets represented by pairs of departure and arrival airports [from, to], reconstruct the itinerary in order. All of the tickets belong to a man who departs from JFK. Thus,...
2018-10-02 19:38:59 298
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人