1363. Largest Multiple of Three
https://leetcode.com/problems/largest-multiple-of-three
Description
Given an array of digits digits
, return the largest multiple of three that can be formed by concatenating some of the given digits in any order. If there is no answer return an empty string.
Since the answer may not fit in an integer data type, return the answer as a string. Note that the returning answer must not contain unnecessary leading zeros.
Example 1:
Example 2:
Example 3:
Example 4:
Constraints:
1 <= digits.length <= 104
0 <= digits[i] <= 9
ac
Last updated