Thursday, August 30, 2018

Leetcode 169. Majority element

August 30, 2018

Introduction


It is an easy level array algorithm. I wrote the solution based on the idea to iterate the array from left to right once, and majority element will keep change, but last one will be the majority element.

My practice


Here is my sharing on Leetcode discuss.


No comments:

Post a Comment