# Leetcode 2139: Minimum Moves to Reach Target Score

3 min readJan 18, 2022

--

In this exercise, we are trying to obtain a target number using `+1`

and `*2`

operations, we also have a limited number of `*2`

operations:

You are playing a game with integers. You start with the integer

`1`

and you want to reach the integer`target`

.

In one move, you can either:Incrementthe current integer by one (i.e.,`x = x + 1`

).Doublethe current integer (i.e.,`x = 2 * x`

).You can use the

incrementoperationanynumber of times, however, you can only use thedoubleoperationat most`maxDoubles`

times.

Given the two…