Ryan’s leetcode Blog
显示标签为“
leetcode
”的博文。
显示所有博文
显示标签为“
leetcode
”的博文。
显示所有博文
2015年7月26日星期日
Remove Duplicates from Sorted List II leetcode
›
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. For exa...
2015年7月20日星期一
Unique Paths II leetcode
›
Follow up for "Unique Paths": Now consider if some obstacles are added to the grids. How many unique paths would there be? An...
2015年7月15日星期三
N-Queens II leetcode
›
Follow up for N-Queens problem. Now, instead outputting board configurations, return the total number of distinct solutions. 与 N-Quee...
2015年6月30日星期二
Word Break II leetcode
›
Given a string s and a dictionary of words dict , add spaces in s to construct a sentence where each word is a valid dictionary word. ...
Text Justification leetcode
›
Given an array of words and a length L , format the text such that each line has exactly L characters and is fully (left and right) just...
Surrounded Regions leetcode
›
Given a 2D board containing 'X' and 'O' , capture all regions surrounded by 'X' . A region is captured by fli...
Word Search leetcode
›
Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cell,...
Set Matrix Zeroes leetcode
›
Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place. "这是一个矩阵操作的题目,目标很明确,就是如果矩阵如果有元素为0,就把...
Spiral Matrix II leetcode
›
Given an integer n , generate a square matrix filled with elements from 1 to n 2 in spiral order. For example, Given n = 3 , You ...
Spiral Matrix leetcode
›
Given a matrix of m x n elements ( m rows, n columns), return all elements of the matrix in spiral order. For example, Given the ...
2015年6月29日星期一
Sudoku Solver leetcode
›
Write a program to solve a Sudoku puzzle by filling the empty cells. Empty cells are indicated by the character '.' . You may ...
Valid Sudoku leetcode
›
Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules . The Sudoku board could be partially filled, where empty cells...
First Missing Positive leetcode
›
Given an unsorted integer array, find the first missing positive integer. For example, Given [1,2,0] return 3 , and [3,4,-1,1] ret...
Pascal's Triangle II leetcode
›
Given an index k , return the k th row of the Pascal's triangle. For example, given k = 3, Return [1,3,3,1] . 与Pascal's ...
Pascal's Triangle leetcode
›
Given numRows , generate the first numRows of Pascal's triangle. For example, given numRows = 5, Return [ [1], [1,1],...
Rotate Image leetcode
›
You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise). Follow up: Could you do this i...
Next Permutation leetcode
›
Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement ...
Remove Element leetcode
›
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. ...
Container With Most Water leetcode
›
Given n non-negative integers a 1 , a 2 , ..., a n , where each represents a point at coordinate ( i , a i ). n vertical lines are ...
2015年6月28日星期日
Regular Expression Matching leetcode
›
Implement regular expression matching with support for '.' and '*' . '.' Matches any single character. '*...
›
主页
查看网络版本