input: Write a python function to find the majority element in an array using Moore's voting algorithm.
  assert find_majority_element([3, 3, 4, 2, 4, 4, 2, 4, 4]) == 4
  assert find_majority_element([2, 2, 1, 1, 1, 2, 2]) == 2
  assert find_majority_element([1, 1, 2, 2, 2, 1, 1]) == 1
output: def find_majority_element(nums):
      candidate, count = nums[0], 1
      for num in nums[1:]:
          if count == 0:
              candidate, count = num, 1
          elif num == candidate:
              count += 1
          else:
              count -= 1
  
      return candidate