Description
Implement wildcard pattern matching with support for '?' and '*'.
Example
'?' Matches any single character.
'*' Matches any sequence of ch
Description
Given two non-negative integers num1 and num2 represented as strings, return the product of num1 and num2.
Note:
The length of both num1 a
Description
Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap af
Description
Given an unsorted integer array, find the first missing positive integer.
Your algorithm should run in O(n) time and uses constant space.
Description
Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to
Description
Given a set of candidate numbers (C) (without duplicates) and a target number (T), find all unique combinations in C where the candidate n
Description
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.
Description
Write a program to solve a Sudoku puzzle by filling the empty cells.
Empty cells are indicated by the character '.'.
You may assume that t
Description
Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were in
Description
Given an array of integers sorted in ascending order, find the starting and ending position of a given target value.
Your algorithm's runt
Description
Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.
(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0
Description
Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring.
Examp
Description
Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.
If such arrangement i
Description
You are given a string, s, and a list of words, words, that are all of the same length. Find all starting indices of substring(s) in s tha
You are climbing a stair case. It takes n steps to reach to the top.
Each time you can either climb 1 or 2 steps. In how many distinct ways can you cl
Given two binary strings, return their sum (also a binary string).
The input strings are both non-empty and contains only characters 1 or 0.
Example 1
Given a non-empty array of digits representing a non-negative integer, plus one to the integer.
The digits are stored such that the most significant d
Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in or
The count-and-say sequence is the sequence of integers with the first five terms as following:
1. 1
2. 11
3. 21
4. 1211
5. 111221
题目:Leetcode:9. Palindrome Number
描述:
内容:Determine whether an integer is a palindrome. Do this without extra space.
Some hints:
Could negative integer