Practice Find if Digit Game Can Be Won
Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.
Problem Statement
You are given an array of positive integers nums. Alice and Bob are playing a game. In the game, Alice can choose either all single-digit numbers or all double-digit numbers from nums, and the rest of the numbers are given to Bob. Alice wins if the sum of her numbers is strictly greater than the sum of Bob's numbers. Return true if Alice can win this game, otherwise, return false.
Source: Find if Digit Game Can Be Won on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
nums = [1,2,3,4,10]
false
# Example 2
nums = [1,2,3,4,5,14]
true
# Example 3
nums = [5,5,5,25]
true
Constraints
Related LeetCode Problems
Practice more problems similar to Find if Digit Game Can Be Won.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.