LeetCode 326: Power of Three
今天突然发现做LeetCode上Math的题目真心很有趣,不仅解法多样,还能时不时被绝妙的想法高潮一波。
Implement the following operations of a queue using stacks.
Given a string containing just the characters '('
, ')'
, '{'
, '}'
, '['
and ']'
, determine if the input string is valid.
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.
Implement strStr(). Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.
Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases.