[LeetCode] First Missing Positive
First Missing PositiveGiven an unsorted integer array, find the first missing positive integer.For example,Given [1,2,0] return 3,and [3,4,-1,1] return 2.Your algorithm s...
[LeetCode] Reverse Linked List
Reverse Linked ListReverse a singly linked list.解题思路:链表翻转。没有什么很大的难度,画个图分析一下即可。单链表的技巧就是申请一个伪头结点,然后在最后的时候删除即可,这样能够保证中间代码不需要考虑不同的情况。/** * Definition for singly-linked list. &n...
芦苇荡-大话西游插曲
这哥们吹的不错。先把它记录下,以后找时间也录个视频。附上简谱:
[LeetCode] Add Binary
Add BinaryGiven two binary strings, return their sum (also a binary string).For example,a = "11"b = "1"Return "100".解题思路:题意为两个字符串表示的二进制相加,求结果。记住常字符串与字符串变量能...
[LeetCode] Path Sum
Path SumGiven a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.For example:Given the below binary tree and&...
Combination Sum II
Combination Sum IIGiven a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.Each number in C ...
[LeetCode] Binary Tree Level Order Traversal II
Binary Tree Level Order Traversal IIGiven a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root).For e...
[LeetCode] Combination Sum
Combination SumGiven a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.The same repeated number m...
滴答-程序远-吉他弹唱
吉他的第一个作品,滴答,音频。您的浏览器不支持html5视频:周末一觉醒来,闲着没事,弹唱滴答。其中有两处弹错了。弹唱的虽然没有起伏,没有感情,也算是自学吉他的一个milestone了,记录一下。以后还得继续努力,希望有所突破。不知为何,声音非常小。后面还有室友的呼吸声哦~以下是对应的吉他谱:
[LeetCode] Count and Say
The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ...1 is read off as "one 1" or 11.11 is read off as "t...
诗意-程序远-吉他弹唱
五一假期,闲着无聊,躲在宿舍,弹唱诗意~2015.05.01附上吉他谱(本人弹的是版本1):版本1版本2:
[LeetCode] Valid Sudoku
Valid SudokuDetermine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules.The Sudoku board could be partially filled, where empty cells are filled with the character '.'.A...
[LeetCode] Sudoku Solver
Sudoku SolverWrite a program to solve a Sudoku puzzle by filling the empty cells.Empty cells are indicated by the character '.'.You may assume that there will be only one unique solution....
[LeetCode] Search in Rotated Sorted Array
Search in Rotated Sorted ArraySuppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).You are given a target value to ...
[LeetCode] Search for a Range
Search for a RangeGiven a sorted array of integers, find the starting and ending position of a given target value.Your algorithm's runtime complexity must be in the order of O(log n).If ...
JS 、CSS开源工具包
1、Masonry,流式布局包http://masonry.desandro.com/ 2、Jquery,强大的js包https://jquery.com/3、css88,前端学习网http://www.css88.com/4、bootstrap,前端css框架http://www.bootcss.com/ 5、甘特图,http://www.kangry.net/blog/?type=articl...
[LeetCode] Longest Valid Parentheses
Longest Valid ParenthesesGiven a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring.For &qu...
[LeetCode] Isomorphic Strings
Isomorphic StringsGiven two strings s and t, determine if they are isomorphic.Two strings are isomorphic if the characters in s can be replaced to get t.All occurrences o...
[LeetCode] Count Primes
Count PrimesDescription:Count the number of prime numbers less than a non-negative number, n解题思路:题意为求小于n的质数的个数。有两种方法:1、naive办法,对小于n的每个数,检查是否为质数。而检查m是否为质数,需要验证是否都不能被2~pow(m, 0.5)整除。这个方法的时间复杂度为O(n^...
[LeetCode] Next Permutation
Next PermutationImplement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangement is not possible, it must rearrange it as the low...