We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2a1e092 commit 106263fCopy full SHA for 106263f
169.py
@@ -0,0 +1,13 @@
1
+# Runtime: 40 ms, faster than 54.99% of Python online submissions for Majority Element.
2
+# Difficulty: Easy
3
+
4
+class Solution(object):
5
+ def majorityElement(self, nums):
6
+ """
7
+ :type nums: List[int]
8
+ :rtype: int
9
10
+ values = dict()
11
+ for num in nums:
12
+ values[num] = values.get(num, 0) + 1
13
+ return max(values, key=values.get)
182.sql
@@ -0,0 +1,4 @@
+# Runtime: 185 ms, faster than 67.53% of MySQL online submissions for Duplicate Emails.
+select Email from Person group by Email having count(*) > 1;
0 commit comments