- 博客(12)
- 收藏
- 关注
原创 Ubuntu如何加密用户密码
Ubuntu 如何加密用户密码 因为最近在上密码学的课程,并且提到了这个问题故我在这里做一个学习记录。 一. 获得加密后的密码 首先,我们可以使用如下命令在ubuntu中新建一个用户(例如:xiaoming),并为xiaoming创建一个属于他的密码(例如:abc): useradd xiaoming passwd xiaoming 效果如下: 所以我们可以得到如下表格: 用户名 密码...
2018-11-11 23:07:06
2138
原创 Vim 的基础命令
最近在摸索vim的使用方法。因为有时候总会忘记,所以特地写份博客记录一下。 目前我对vim的理解还很浅,所以能用到的地方也很有限。故我现在只记录一些自己经过验证的操作。 一.插入操作 i --在光标所在前一个位置插入 I --在当前行首位置插入 a --在光标所在后一个位置插入 A --在当前行尾位置插入 o --在当前行的下一行插入新的一行 O --在当前行的上一行插入新的一行 二.删...
2018-06-18 21:07:26
269
原创 LeetCode:127. Word Ladder
题目要求大体如下: Given two words (beginWord and endWord), and a dictionary’s word list, find the length of shortest transformation sequence from beginWord to endWord, such that: Only one letter can be chan
2018-02-06 22:16:03
287
原创 LeetCode:120. 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], [
2018-02-03 16:04:08
288
原创 LeetCode:114.Flatten Binary Tree to Linked List
题目的要求大体如下: Given a binary tree, flatten it to a linked list in-place. For example, Given 1 / \ 2 5 / \ \ 3 4 6 The flattened tree should look like: 1 \ 2
2018-02-03 00:39:57
275
原创 LeetCode:113. 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 and sum = 22, 5
2018-02-01 20:38:31
307
原创 LeetCode:109. 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. For this problem, a height-balanced binary tree is defined as a binary tree in
2018-01-31 21:33:49
241
原创 LeetCode:106. 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 duplicates do not exist in the tree. For example, given inorder = [9,3,15,20,7] p
2018-01-30 12:54:12
260
原创 LeetCode:105. 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 duplicates do not exist in the tree. For example, given preorder = [3,9,20,15,7] ino
2018-01-28 16:29:41
242
原创 LeetCode:103.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 and alternate between). For example: Given
2018-01-27 17:40:43
246
原创 LeetCode:102.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 tree [3,9,20,null,null,15,7], 3 / \
2018-01-27 00:56:17
236
原创 LeetCode: 98.Validate Binary Search Tree
以下是题目要求: 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 contains only nodes with keys less than the nod
2018-01-26 00:11:15
277
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅