easy
肥哓
加油~(*^__^*)
展开
-
leetcode 119: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?原创 2016-01-11 17:21:29 · 254 阅读 · 0 评论 -
leetcode 88: Merge Sorted Array
问题描述:Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array.原创 2016-02-17 01:57:43 · 216 阅读 · 0 评论 -
leetcode 36: Valid Sudoku
问题描述:Determine 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 ‘.’Note: A valid Sudoku board原创 2016-02-17 16:49:42 · 275 阅读 · 0 评论 -
leetcode 223: Rectangle Area
问题描述:Find the total area covered by two rectilinear rectangles in a 2D plane.Each rectangle is defined by its bottom left corner and top right corner as shown in the figure.原创 2016-02-18 16:01:42 · 247 阅读 · 0 评论 -
leetcode 219: Contains Duplicate II
问题描述:Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such that nums[i] = nums[j] and the difference between i and j is at most k.原创 2016-02-19 11:58:03 · 307 阅读 · 0 评论 -
leetcode 19: Remove Nth Node From End of List
问题描述:Given a linked list, remove the nth node from the end of list and return its head.原创 2016-02-19 23:27:08 · 339 阅读 · 0 评论 -
leetcode 205 : Isomorphic Strings
##问题描述:##Given 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.原创 2016-02-23 00:46:53 · 335 阅读 · 0 评论 -
leetcode 290: Word Pattern
问题描述:Given a pattern and a string str, find if str follows the same pattern.Here follow means a full match, such that there is a bijection between a letter in pattern and a non-empty word in str.原创 2016-02-24 01:03:01 · 356 阅读 · 0 评论 -
leetcode 38: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 “two 1s” or 21. 21 is read off as “one 2原创 2016-02-25 09:46:12 · 367 阅读 · 0 评论 -
leetcode 257:Binary Tree Paths
问题描述:Given a binary tree, return all root-to-leaf paths.For example, given the following binary tree:1 / \ 2 3 \ 5 All root-to-leaf paths are:[“1->2->5”, “1->3”]思路:这又是一道遍历二叉树的题目,谨记叶节点的定义原创 2016-02-26 00:16:46 · 505 阅读 · 0 评论 -
leetcode 204: Count Primes
问题描述:Description:Count the number of prime numbers less than a non-negative number, n.原创 2016-02-28 09:57:20 · 333 阅读 · 0 评论 -
leetcode 125: 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 palindrom原创 2016-02-28 11:53:29 · 425 阅读 · 0 评论 -
leetcode 160:Intersection of Two Linked Lists
问题描述:Write a program to find the node at which the intersection of two singly linked lists begins.原创 2016-02-16 23:36:45 · 348 阅读 · 0 评论 -
leetcode 111: Minimum Depth of Binary Tree
问题描述:Given a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root node down to the nearest leaf node.原创 2016-02-16 00:22:25 · 235 阅读 · 0 评论 -
leetcode 328 Odd Even Linked List
问题描述:Given a singly linked list, group all odd nodes together followed by the even nodes. Please note here we are talking about the node number and not the value in the nodes.You should try to do it in原创 2016-02-15 00:12:23 · 242 阅读 · 0 评论 -
leetcode 66: 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.原创 2016-01-05 23:41:09 · 357 阅读 · 0 评论 -
leetcode 118: Pascal's Triangle
问题描述:Given numRows, generate the first numRows of Pascal’s triangle.原创 2016-01-05 23:46:50 · 289 阅读 · 0 评论 -
leetcode 26: Remove Duplicates from Sorted Array
问题描述:Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.Do not allocate extra space for another array, you must do this in place with原创 2016-01-05 23:28:00 · 230 阅读 · 0 评论 -
leetcode 198: House Robber
问题描述:You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is that adjacent h原创 2016-01-05 23:16:50 · 287 阅读 · 0 评论 -
leetcode 107: Binary Tree Level Order Traversal II
问题描述:Given a binary tree, return the bottom-up level order traversal of its nodes’ values.原创 2016-01-05 01:20:16 · 271 阅读 · 0 评论 -
leetcode 27: Remove Element
问题描述: Given an array and a value, remove all instances of that value in place and return the new length.The order of elements can be changed. It doesn’t matter what you leave beyond the new length原创 2016-01-05 00:25:41 · 257 阅读 · 0 评论 -
leetcode 101: Symmetric Tree
leetcode 101: Symmetric Tree原创 2015-12-31 01:03:10 · 305 阅读 · 0 评论 -
leetcode 110: Balanced Binary Tree
leetcode 110: Balanced Binary Tree原创 2015-12-30 00:53:27 · 332 阅读 · 0 评论 -
leetcode 21: Merge Two Sorted Lists
leetcode 21: Merge Two Sorted Lists原创 2015-12-28 23:16:51 · 329 阅读 · 0 评论 -
leetcode 232: Implement Queue using Stacks
leetcode 232. Implement Queue using Stacks原创 2015-12-28 21:27:29 · 376 阅读 · 0 评论 -
leetcode 172: Factorial Trailing Zeroes
问题描述:Given an integer n, return the number of trailing zeroes in n!.Note: Your solution should be in logarithmic time complexity.原创 2016-01-11 17:51:27 · 248 阅读 · 0 评论 -
leetcode 155: Min Stack
问题描述:Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.原创 2016-02-29 01:32:15 · 279 阅读 · 0 评论