Skip to content

Commit 3997671

Browse files
committed
Add solution 169.
1 parent 5b53aae commit 3997671

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
class Solution {
2+
3+
/**
4+
* @param Integer[] $nums
5+
* @return Integer
6+
*/
7+
function majorityElement($nums) {
8+
sort($nums);
9+
return $nums[intval(count($nums)/2)];
10+
}
11+
}

0 commit comments

Comments
 (0)