- 博客(17)
- 资源 (1)
- 收藏
- 关注
原创 LeetCode52. N-Queens II
LeetCode52. N-Queens II题目:Follow up for N-Queens problem.Now, instead outputting board configurations, return the total number of distinct solutions.代码:class Solution {public:
2017-10-25 22:43:03 142
原创 Leetcode51. N-Queens
Leetcode51. N-Queens题目:The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other.Given an integer n, return all distinct sol
2017-10-25 22:40:48 158
原创 Leetcode671. Second Minimum Node In a Binary Tree
题目:Given a non-empty special binary tree consisting of nodes with the non-negative value, where each node in this tree has exactly twoor zero sub-node. If the node has two sub-nodes, then this
2017-10-25 22:38:10 209
原创 LeetCode230. Kth Smallest Element in a BST
LeetCode230. Kth Smallest Element in a BST题目:Given a binary search tree, write a function kthSmallest to find the kth smallest element in it.Note: You may assume k is always valid, 1 ≤
2017-10-25 22:35:38 138
原创 LeetCode594. Longest Harmonious Subsequence
LeetCode594. Longest Harmonious Subsequence题目:We define a harmonious array is an array where the difference between its maximum value and its minimum value is exactly 1.Now, given an integ
2017-10-25 22:33:08 159
原创 LeetCode687. Longest Univalue Path
LeetCode687. Longest Univalue Path题目:Given a binary tree, find the length of the longest path where each node in the path has the same value. This path may or may not pass through the root.
2017-10-25 22:29:37 261
原创 LeetCode140. Word Break II
LeetCode140. Word Break II题目:Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, add spaces in s to construct a sentence where each word is a valid dicti
2017-10-21 23:10:28 193
原创 LeetCode139. Word Break
LeetCode139.Word_Break题目:Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, determine if s can be segmented into a space-separated sequence of one or mo
2017-10-21 16:02:46 128
原创 selpg开发
selpggolang for selpg(CLI) 开发 Linux 命令行实用程序1. usage1. $ selpg -s=1 -e=1 input_file 该命令将把“input_file”的第 1 页写至标准输出(也就是屏幕),因为这里没有重定向或管道。2. $ selpg -s=1 -e=1 < input_file 该命令与示例 1 所做的工作相同,但在本例中,
2017-10-19 13:25:37 326
原创 LeetCode669. Trim a Binary Search Tree
LeetCode669. Trim a Binary Search Tree题目:Given a binary search tree and the lowest and highest boundaries as L and R, trim the tree so that all its elements lies in [L, R] (R >= L). You migh
2017-10-19 13:17:28 197
原创 Leetcode530. Minimum Absolute Difference in BST
Leetcode530. Minimum Absolute Difference in BST题目:Given a binary search tree with non-negative values, find the minimum absolute difference between values of any two nodes.Example:Inpu
2017-10-19 12:52:09 228
原创 LeetCode56. Merge Intervals
LeetCode56. Merge Intervals题目:Given a collection of intervals, merge all overlapping intervals.For example,Given [1,3],[2,6],[8,10],[15,18],return [1,6],[8,10],[15,18].题目分析:很简单的一道题,首
2017-10-10 18:46:45 192
原创 DES算法的实现
DES算法的实现DES 算法概述DES 是一种典型的块加密方法:它以64位为分组长度,64 位一组的明文作为算法的输入,通过一系列复杂的操作, 输出同样64位长度的密文。DES 使用加密密钥定义变换过程,因此算法认为只有持有 加密所用的密钥的用户才能解密密文。DES 的采用64位密钥,但由于每8位中的最后1位用于奇偶 校验,实际有效密钥长度为56位。密钥可以是任意的
2017-10-02 13:52:59 1576
原创 sicily1000. 词法分析程序设计 **
sicily1000. 词法分析程序设计 **题目:Description设一语言的关键词、运算符、分界符的个数与单词如下: struct { int number; string str[10]; } keywords={3,"int","main","return"} ; //关键词struct { int number; string str[10]; } o
2017-10-02 12:13:03 5067
原创 LeetCode125. Valid Palindrome
LeetCode125. Valid Palindrome题目: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"
2017-10-01 01:39:46 197
原创 LeetCode653. Two Sum IV - Input is a BST
LeetCode653. Two Sum IV - Input is a BST题目:Given a Binary Search Tree and a target number, return true if there exist two elements in the BST such that their sum is equal to the given target.
2017-10-01 01:32:45 155
原创 LeetCode682. Baseball Game
LeetCode682. Baseball Game题目:You're now a baseball game point recorder.Given a list of strings, each string can be one of the 4 following types:Integer (one round's score): Directly re
2017-10-01 01:30:13 1373
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人