Hard
Given an array nums of digits (each 0-9), form the largest possible multiple of three by concatenating some of the digits, using each at most once. Return that number as an integer. If no non-empty selection is a multiple of three, return -1. If the largest value you can form is 0 (only zeros usable), return 0.
Input: nums = [8,1,9] Output: 981
Input: nums = [8,6,7,1,0] Output: 8760
Input: nums = [1] Output: -1