https://oj.leetcode.com/problems/majority-element/
O(n) time complexity, O(1) space complexity.
Based on Moore’s Voting Algorithm(Majority Vote Algorithm), 508 ms time cost.
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
https://oj.leetcode.com/problems/majority-element/
O(n) time complexity, O(1) space complexity.
Based on Moore’s Voting Algorithm(Majority Vote Algorithm), 508 ms time cost.