沉淀
LeeCode10. Regular Expression Matching

Implement regular expression matching with support for ‘.’ and ‘*’.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
'.' Matches any single character.
'*' Matches zero or more of the preceding element.
The matching should cover the entire input string (not partial).
The function prototype should be:
bool isMatch(const char *s, const char *p)
Some examples:
isMatch("aa","a") → false
isMatch("aa","aa") → true
isMatch("aaa","aa") → false
isMatch("aa", "a*") → true
isMatch("aa", ".*") → true
isMatch("ab", ".*") → true
isMatch("aab", "c*a*b") → true

LeeCode387. First Unique Character in a String

Given a string, find the first non-repeating character in it and return it’s index. If it doesn’t exist, return -1.

LeeCode383. Ransom Note

Given an arbitrary ransom note string and another string containing letters from all the magazines, write a function that will return true if the ransom note can be constructed from the magazines ; otherwise, it will return false.

LeeCode374. Guess Number Higher or Lower

We are playing the Guess Game. The game is as follows:

LeeCode371. Sum of Two Integers

Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -.

LeeCode367. Valid Perfect Square

Given a positive integer num, write a function which returns True if num is a perfect square else False.

LeeCode350. Intersection of Two Arrays II

Given two arrays, write a function to compute their intersection.

LeeCode349. Intersection of Two Arrays

Given two arrays, write a function to compute their intersection.

LeeCode345. Reverse Vowels of a String

Write a function that takes a string as input and reverse only the vowels of a string.

LeeCode344. Reverse String

Write a function that takes a string as input and returns the string reversed.