You start with an initial power of power, an initial score of 0, and a bag of tokens given as an integer array tokens, where each tokens[i] denotes the value of the ith token.
Your goal is to maximise the total score by strategically playing these tokens. In one move, you can play an unplayed token in one of two ways (but not both for the same token):
tokens[i], you may play the token, losing tokens[i] power and gaining 1 score.1, you may play the token, gaining tokens[i] power and losing 1 score.Return the maximum possible score you can achieve after playing any number of tokens.
0 <= tokens.length <= 10000 <= tokens[i], power < 10^4tokens = [100], power = 500tokens = [200, 100], power = 1501tokens = [100, 200, 300, 400], power = 2002