Company: Mercer | Mettl_13oct
Difficulty: medium
Rock Paper Scissors Problem Description James and Lily are playing a tournament of rock, paper and scissors containing N number of matches. In the game of Rock, Paper, Scissors certain hand signs indicating rock, paper and scissors are made by two players. Points are awarded to players, based on the following rules: Rock beats Scissors Scissors beats Paper Paper beats Rock If both players use the same hand sign, no player is awarded any points. The player with more points wins the tournament. James never plays the same hand signs in two consecutive games. You are given the number of matches played in the tournament and Lily's hand signs in each match, in the form of a string containing R, P and S representing rock, paper and scissors respectively. Your task is to find and return the total number of winning sequences in which James can win the tournament against Lily. Note: Return answer modulo 10 9 + 7. Input Specification input1: An integer value N representing the number of matches p