Solutions 1581-1590

Q1583 Coins are placed in an array, alternately heads up and tails up. At each move, you are allowed to turn over all coins that form one connected region. How can you get all the coins heads up in the minimum possible number of moves?