![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Algorithm
文章平均质量分 63
kradnangel
...
展开
-
[题解][LeetCode][Linked List Cycle II]
题目:Given a linked list, return the node where the cycle begins. If there is no cycle, return null.Follow up:Can you solve it without using extra space?题解1:原创 2014-07-18 14:58:39 · 668 阅读 · 1 评论 -
[题解][LeetCode][Palindrome Number]
题目:题解:Code:原创 2014-07-31 14:03:46 · 635 阅读 · 0 评论 -
[题解][LeetCode][Divide Two Integers]
题解:位运算Code:class Solution: # @return an integer def divide(self, dividend, divisor): if divisor == 1: return dividend if divisor == -1: retu原创 2014-07-30 16:17:14 · 942 阅读 · 0 评论 -
[题解][LeetCode][Scramble String]
题目:Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representation of s1 = "great": great /原创 2014-07-30 14:47:57 · 702 阅读 · 0 评论 -
[题解][LeetCode][Valid Palindrome]
Code:原创 2014-07-29 23:25:33 · 569 阅读 · 0 评论 -
[题解][LeetCode][Combinations]
题目:题解:Code:原创 2014-07-29 00:29:12 · 646 阅读 · 0 评论 -
[题解][LeetCode][Pascal's Triangle II]
题目:题解:Code:原创 2014-07-28 22:57:20 · 561 阅读 · 0 评论 -
[题解][Leetcode][Unique Binary Search Trees]
题目:Given n, how many structurally unique BST's (binary search trees) that store values 1...n?For example,Given n = 3, there are a total of 5 unique BST's.1 3 3 2 1原创 2014-07-15 14:36:24 · 682 阅读 · 0 评论 -
[题解][LeetCode][Sort Colors]
题目:Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, white and blue.Here, we will use the原创 2014-07-21 21:52:59 · 610 阅读 · 0 评论 -
[题解][LeetCode][Single Number II]
题目:题解:Code:class Solution: # @param A, a list of integer # @return an integer def singleNumber(self, A): d = {'0' : 0} for i in A:原创 2014-07-16 16:53:06 · 718 阅读 · 0 评论 -
[题解][LeetCode][Binary Tree Level Order Traversal]
题目:题解:Code:class Solution: # @param root, a tree node # @return a list of lists of integers def levelOrder(self, root): ans = [] if root is None: return ans a = [原创 2014-07-22 20:02:05 · 672 阅读 · 0 评论 -
[题解][LeetCode][Linked List Cycle]
题目:Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?题解:我们需要一块原创 2014-07-15 15:45:38 · 569 阅读 · 0 评论 -
[题解][LeetCode][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原创 2014-07-31 12:50:27 · 591 阅读 · 0 评论