Leetcode
文章平均质量分 61
江尹城
学我所爱,且行且珍惜
展开
-
【Leetcode】378. Kth Smallest Element in a Sorted Matrix
Given a n x n matrix where each of the rows and columns are sorted in ascending order, find the kth smallest element in the matrix. Note that it is the kth smallest element in the sorted order, not原创 2016-09-03 10:26:49 · 281 阅读 · 0 评论 -
【Leetcode】100. Same Tree
Given two binary trees, write a function to check if they are equal or not. Two binary trees are considered equal if they are structurally identical and the nodes have the same value. /** * Def原创 2016-09-03 10:43:00 · 296 阅读 · 0 评论 -
【Leetcode】116. 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.原创 2016-09-03 11:06:07 · 221 阅读 · 0 评论 -
【Leetcode】51. 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 solutions to the n-queens puzzle原创 2016-09-04 11:11:04 · 298 阅读 · 0 评论 -
【Leetcode】17. 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原创 2016-09-04 13:14:55 · 293 阅读 · 0 评论 -
【Leetcode】131. Palindrome Partitioning
Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s. For example, given s = "aab", Return [ ["aa","b"],原创 2016-09-04 17:15:11 · 326 阅读 · 0 评论 -
【Leetcode】39. Combination Sum
Given 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 may be chosen from C unlimited numb原创 2016-09-05 11:00:12 · 291 阅读 · 0 评论 -
【Leetcode】201. Bitwise AND of Numbers Range
Total Accepted: 42844Total Submissions: 132439Difficulty: Medium Given a range [m, n] where 0 For example, given the range [5, 7], you should return 4. public int rangeBitwiseAnd(int m, int原创 2016-09-19 23:01:44 · 453 阅读 · 0 评论