Skip to content

Commit 66692b1

Browse files
committed
add a solution
1 parent 78f2994 commit 66692b1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

169. Majority Element(Genius Way).py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
class Solution(object):
2+
def majorityElement(self, nums):
3+
return sorted(nums)[len(nums)//2]

0 commit comments

Comments
 (0)