input: Write a function to find the largest sum of elements in a list that is a multiple of 3.
  assert largestMultipleOf3([3, 15, 4, 6, 5]) == 33
  assert largestMultipleOf3([1, 2, 3, 4, 5]) == 15
  assert largestMultipleOf3([7, 8, 1]) == 9
output: def largestMultipleOf3(arr):
      arr.sort(reverse=True)
      total_sum = sum(arr)
      
      if total_sum % 3 == 0:
          return total_sum
      
      mod1, mod2 = [], []
      for num in arr:
          if num % 3 == 1:
              mod1.append(num)
          elif num % 3 == 2:
              mod2.append(num)
      
      if total_sum % 3 == 1:
          if mod1:
              total_sum -= mod1[-1]
          elif len(mod2) >= 2:
              total_sum -= sum(mod2[-2:])
          else:
              return 0
      elif total_sum % 3 == 2:
          if mod2:
              total_sum -= mod2[-1]
          elif len(mod1) >= 2:
              total_sum -= sum(mod1[-2:])
          else:
              return 0
      
      return total_sum