原创 117_leetcode_Candy
There are N children standing in a line. Each child is assigned a rating value. You are giving candies to these child
原创 128_leetcode_Sort Colors
1: Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent,
原创 121_leetcode_Wildcard Matching
Implement wildcard pattern matching with support for '?' and '*'. '?' Matches any single character. '*' Matches any s
原创 125_leetcode_Max Points on a Line
Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. 1:注意特殊情況, 點的個數爲1,2
原创 116_leetcode_Multiply Strings
Given two numbers represented as strings, return multiplication of the numbers as a string. Note: The numbers can be
原创 129_leetcode_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
原创 114_leetcode_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
原创 127_leetcode_Distinct Subsequences
Given a string S and a string T, count the number of distinct subsequences of T in S. A subsequence of a string is a
原创 126_leetcode_Word Search
Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequent
原创 118_leetcode_Palindrome Partitioning
Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible pali
原创 120_leetcode_Regular Expression Matching
Implement regular expression matching with support for '.' and '*'. '.' Ma
原创 124_leetcode_Surrounded Regions
Given a 2D board containing 'X' and 'O', capture all regions surrounded by 'X'. A region is captured by flipping al
原创 131_leetcode_Valid Sudoku
Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules. The Sudoku board could be partially filled
原创 132_leetcode_Sudoku Solver
Write a program to solve a Sudoku puzzle by filling the empty cells. Empty cells are indicated by the character '.'.
原创 133_leetcode_Median of Two Sorted Array
There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall