LeetCode 数据库查询题【Easy】:182. Duplicate Emails
链接:https://leetcode.com/problems/duplicate-emails/
Question
Table: Person
1 | +-------------+---------+ |
链接:https://leetcode.com/problems/duplicate-emails/
Table: Person
1 | +-------------+---------+ |
链接:https://leetcode.com/problems/valid-parentheses/
Given a string s
containing just the characters '('
, ')'
, '{'
, '}'
, '['
and ']'
, determine if the input string is valid.
An input string is valid if:
Example 1:
1 | Input: s = "()" |
Example 2:
1 | Input: s = "()[]{}" |
Example 3:
1 | Input: s = "(]" |
链接:https://leetcode.com/problems/longest-substring-without-repeating-characters/
Given a string s
, find the length of the longest substring without repeating characters.
Example 1:
1 | Input: s = "abcabcbb" |
Example 2:
1 | Input: s = "bbbbb" |
Example 3:
1 | Input: s = "pwwkew" |
链接:https://leetcode.com/problems/reverse-integer/
Given a signed 32-bit integer x
, return x
with its digits reversed. If reversing x
causes the value to go outside the signed 32-bit integer range [-231, 231 - 1]
, then return 0
.
Assume the environment does not allow you to store 64-bit integers (signed or unsigned).
Example 1:
1 | Input: x = 123 |
Example 2:
1 | Input: x = -123 |
Example 3:
1 | Input: x = 120 |
Constraints:
231 <= x <= 231 - 1
链接:https://leetcode.com/problems/employees-earning-more-than-their-managers/
Table: Employee
1 | +-------------+---------+ |
id is the primary key column for this table.
Roman numerals are represented by seven different symbols: I
, V
, X
, L
, C
, D
and M
.
1 | SymbolValue |
For example, 2
is written as II
in Roman numeral, just two ones added together. 12
is written as XII
, which is simply X + II
. The number 27
is written as XXVII
, which is XX + V + II
.
Table: Person
1 | +-------------+---------+ |
Write a function to find the longest common prefix string amongst an array of strings.
If there is no common prefix, return an empty string ""
.
Example 1:
1 | Input: strs = ["flower","flow","flight"] |
Example 2:
1 | Input: strs = ["dog","racecar","car"] |
Constraints:
1 <= strs.length <= 200
0 <= strs[i].length <= 200
strs[i]
consists of only lowercase English letters.Given an integer x
, return true
if x
is palindrome integer.
An integer is a palindrome when it reads the same backward as forward.
121
is a palindrome while 123
is not.Example 1:
1 | Input: x = 121 |
Example 2:
1 | Input: x = -121 |
Example 3:
1 | Input: x = 10 |