- 博客(146)
- 资源 (116)
- 收藏
- 关注
原创 【LeetCode with Python】 Roman to Integer
Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.
2014-07-06 15:26:46
6523
原创 【LeetCode with Python】 Reorder List
Given a singly linked list L: L0→L1→…→Ln-1→Ln,reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→…You must do this in-place without altering the nodes' values.For example,Given {1,2,3,4}, reorder it to {1,4,2,3}.
2014-07-06 15:24:34
2978
原创 【LeetCode with Python】 Plus One
Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit is at the head of the list.
2014-07-06 15:21:09
4672
原创 【LeetCode with Python】 Pascal's Triangle II
Given an index k, return the kth row of the Pascal's triangle.For example, given k = 3,Return [1,3,3,1].Note:Could you optimize your algorithm to use only O(k) extra space?
2014-07-06 15:17:49
3031
原创 【LeetCode with Python】 Palindrome Number
Determine whether an integer is a palindrome. Do this without extra space.click to show spoilers.Some hints:Could negative integers be palindromes? (ie, -1)If you are thinking of converting the integer to string, note the restriction of using extra
2014-07-06 15:14:14
3573
原创 【LeetCode with Python】 Longest Consecutive Sequence
Given an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given [100, 4, 200, 1, 3, 2],The longest consecutive elements sequence is [1, 2, 3, 4]. Return its length: 4.Your algorithm should run in O(
2014-07-06 15:09:23
4618
原创 【LeetCode with Python】 Longest Common Prefix
Write a function to find the longest common prefix string amongst an array of strings.
2014-07-06 15:07:26
2970
原创 【LeetCode with Python】 Letter Combinations of a Phone Number
Given a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the telephone buttons) is given below.Input:Digit string "23"Output: ["ad", "ae", "af", "bd", "be", "bf", "cd", "
2014-07-06 15:05:22
3897
原创 【LeetCode with Python】 Integer to Roman
Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.
2014-07-06 15:01:14
4240
原创 【LeetCode with Python】 Edit Distance
Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.)You have the following 3 operations permitted on a word:a) Insert a characterb) Delete a characterc) Replace a
2014-07-06 14:53:52
26664
原创 【LeetCode with Python】 Container With Most Water
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, suc
2014-07-06 14:33:52
4549
原创 【LeetCode with Python】 Climbing Stairs
You are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?
2014-07-06 14:28:22
3805
原创 【LeetCode with Python】 Binary Tree Level Order Traversal II
Given 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 example:Given binary tree {3,9,20,#,#,15,7}, 3 / \ 9 20 / \ 15 7return its bottom
2014-07-06 14:18:05
3972
原创 【LeetCode with Python】 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,#,#,15,7}, 3 / \ 9 20 / \ 15 7return its level order traversal as:[ [3]
2014-07-06 14:12:36
2666
原创 【LeetCode with Python】 Remove Nth Node From End of List
Given a linked list, remove the nth node from the end of list and return its head.For example, Given linked list: 1->2->3->4->5, and n = 2. After removing the second node from the end, the linked list becomes 1->2->3->5.Note:Given n will alway
2014-07-04 16:34:20
2080
原创 【LeetCode with Python】 Populating Next Right Pointers in Each Node II
Follow up for problem "Populating Next Right Pointers in Each Node".What if the given tree could be any binary tree? Would your previous solution still work?Note: You may only use constant extra space.For example,Given the following binary tree
2014-07-04 16:29:12
2051
原创 【LeetCode with Python】 Populating Next Right Pointers in Each Node
Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; }Populate each next pointer to point to its next right node. If there is no next right node, the next pointer should be set
2014-07-04 16:26:33
1982
原创 【LeetCode with Python】 Valid Parentheses
Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.The brackets must close in the correct order, "()" and "()[]{}" are all valid but "(]" and "([)]" are not.
2014-07-04 16:19:41
2006
原创 【LeetCode with Python】 Subsets II
Given a collection of integers that might contain duplicates, S, return all possible subsets.Note: Elements in a subset must be in non-descending order. The solution set must not contain duplicate subsets.For example,If S = [1,2,2], a solutio
2014-07-04 16:11:45
3027
原创 【LeetCode with Python】 Subsets
Given a set of distinct integers, S, return all possible subsets.Note: Elements in a subset must be in non-descending order. The solution set must not contain duplicate subsets.For example,If S = [1,2,3], a solution is:[ [3], [1], [2]
2014-07-04 16:04:01
2535
原创 【LeetCode with Python】 Add Two Numbers
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.Input: (2 -> 4 -> 3) + (5 -> 6 -> 4)Output: 7
2014-06-27 18:11:19
1789
原创 【LeetCode with Python】 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 / \ 4 8 / / \ 11 13 4
2014-06-27 18:02:30
1995
原创 【LeetCode with Python】 Path Sum
Given 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 sum = 22, 5 / \ 4 8
2014-06-27 18:00:10
2113
原创 【LeetCode with Python】 Binary Tree Maximum Path Sum
Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the below binary tree, 1 / \ 2 3Return 6.
2014-06-16 22:46:37
1837
原创 【LeetCode with Python】 Restore IP Addresses
Given a string containing only digits, restore it by returning all possible valid IP address combinations.For example:Given "25525511135",return ["255.255.11.135", "255.255.111.35"]. (Order does not matter)
2014-06-15 22:48:33
1914
原创 The Survey of Programming Language Classification
ABSTRACT 1.INTRODUCTION With the increasing of programming language varieties, more and more programmers have to study and make use of several programming languages in the meantime. Different
2013-06-28 19:18:06
20724
原创 【LeetCode with Python】 Gas Station
There are N gas stations along a circular route, where the amount of gas at station i is gas[i].You have a car with an unlimited gas tank and it costs cost[i] of gas to travel from station i to its next station (i+1). You begin the journey with an empty
2009-06-10 21:16:00
52154
1
原创 【LeetCode with Python】 Interleaving String
Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2.For example,Given:s1 = "aabcc",s2 = "dbbca",When s3 = "aadbbcbcac", return true.When s3 = "aadbbbaccc", return false.
2009-06-10 20:34:00
19275
原创 【LeetCode with Python】 Reverse Linked List II
Reverse a linked list from position m to n. Do it in-place and in one-pass.For example:Given 1->2->3->4->5->NULL, m = 2 and n = 4,return 1->4->3->2->5->NULL.Note:Given m, n satisfy the following condition:1 ≤ m ≤ n ≤ length of list.
2009-05-28 22:47:00
18136
原创 【LeetCode with Python】 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" is a palindrome."race a car" is not a palindrome.Note:Have you consider that the string might b
2009-05-26 11:42:00
13465
原创 【LeetCode with Python】 Add Binary
Given two binary strings, return their sum (also a binary string).For example,a = "11"b = "1"Return "100".
2009-04-29 21:13:00
46616
原创 -
The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility)P A H NA P L S I I GY I RAnd then read line by line: "PAHNAPLSIIGYIR
2008-12-07 14:03:00
47364
原创 【LeetCode with Python】 Evaluate Reverse Polish Notation
Evaluate the value of an arithmetic expression in Reverse Polish Notation.Valid operators are +, -, *, /. Each operand may be an integer or another expression.Some examples: ["2", "1", "+", "3", "*"] -> ((2 + 1) * 3) -> 9 ["4", "13", "5", "/", "+"
2008-12-07 14:02:00
11232
原创 【LeetCode with Python】 Length of Last Word
Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string.If the last word does not exist, return 0.Note: A word is defined as a character sequence consists of non-space charact
2008-12-07 14:01:00
9869
原创 【LeetCode with Python】 Median of Two Sorted Arrays
There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).
2008-12-07 13:59:00
9210
原创 【LeetCode with Python】 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].
2008-12-07 13:55:00
9433
转换指南:将程序从托管扩展C++迁移到C++/CLI
2015-01-25
让你不再害怕指针
2015-01-25
数据结构C++语言描述 - William Ford - 清华大学出版社
2015-01-25
C和C++代码精粹 - Bruce_Eckel - 人民邮电出版社
2015-01-25
嵌入式计算系统设计原理 - Wayne Wolf - 机械工业出版社
2015-01-23
The Science Of Programming - David Gries
2015-01-23
编译原理 第二版中文版 Alfred V Aho 机械工业出版社
2015-01-23
C++编程思想 - Bruce Eckel - 机械工业出版社
2015-01-24
软件工程:实践者的研究方法 第六版中文版 Roger S Pressman 机械工业出版社
2015-01-23
ZendStudio 12 0 1 linux gtk x86 64 part1 含破解工具 共两个压缩卷
2015-01-23
编程精粹:Microsoft编写优质无错C程序秘诀 - Steve Maguire - 电子工业出版社
2015-01-25
ZendStudio 12 0 1 linux gtk x86 64 part2 含破解工具 共两个压缩卷
2015-01-23
汇编语言 第2版 王爽 清华大学出版社
2015-01-23
C++ Templates 简体中文版 David Vandevoorde 人民邮电出版社
2015-01-24
C++编程规范:101条准则、规则与最佳实践.Herb Sutter.人民邮电出版社
2015-01-24
C++面向对象多线程编程 - Cameron Hughes - 人民邮电出版社
2015-01-24
C++语言的设计和演化 - Bjarne Stroustrup - 机械工业出版社
2015-01-24
深度探索C++对象模型 - Stanley B.Lippman - 华中科技大学出版社
2015-01-25
精通Qt4编程 - 蔡志明 - 电子工业出版社
2015-01-23
C++高级参考手册 - Clayton Walnum - 电子工业出版社
2015-01-24
Bash Beginners Guide(中文版) - Machtelt Garrels
2015-01-25
TCP/IP详解(卷1,卷2,卷3) - W.Richard Stevens - 机械工业出版社
2015-01-25
算法导论(第三版) 中文完整清晰版PDF 带书签
2015-02-01
软件工程:实践者的研究方法 第七版中文版 Roger S Pressman 机械工业出版社
2015-01-23
MySQL核心技术手册 第二版中文版 Russell J T Dyer 机械工业出版社
2015-01-25
推荐系统实践(高清版) - 项亮 - 人民邮电出版社
2015-01-23
推荐系统实践(高清版).项亮.人民邮电出版社
2015-01-23
深入理解MySQL核心技术 中文版 Sasba Pachev 中国电力出版社
2015-01-25
图像处理 分析与机器视觉 第三版中文版 Milan Sonka 人民邮电出版社
2015-01-23
MySQL网络数据库指南 - Paul DuBois - 机械工业出版社
2015-01-25
MySQL核心内幕 - 祝定泽 - 清华大学出版社
2015-01-25
计算机程序的构造和解释(中文第二版) - Harold Abelson - 机械工专业出版社
2015-03-22
Linux内核设计与实现(第三版中文版) - Robert Love - 机械工业出版社
2015-01-25
鸟哥的Linux私房菜服务器架设篇(第三版) - 鸟哥 - 机械工业出版社
2015-01-25
SQL编程风格 - Joe Celko - 人民邮电出版社
2015-01-25
PHP高级程序设计:模式、框架与测试 - Kevin McArthur - 人民邮电出版社
2015-02-20
设计模式:基于C#的工程化实现及扩展.王翔.电子工业出版社
2015-01-23
设计模式:基于C#的工程化实现及扩展 - 王翔 - 电子工业出版社
2015-01-23
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人