title: Maximum Games Played Winner
signature: def maximumGamesPlayedWinner(n: Int) = {
test_code: import scala.collection.mutable.HashMap
  import scala.collection.immutable.HashSet
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  
  // TESTING CODE 
  // ============================================
  def validateSolution(actual: Int , expected: Int): Boolean = {
      actual.toString == expected.toString
  }
  
  def driver(n: Int, expected: Int): String = {
      try {
          if (validateSolution(PLACEHOLDER_FN_NAME(n),expected)) {
              "PASSED"
          } else{
              "FAILED"
          }
      }catch{
          case e: Exception => {e.getClass.getName}
      }
  
  }
  object QuestionEvaluator extends App {
  
      println(s"TEST-0...${driver(
        73, 
        8    
      )}")   
  
  
      println(s"TEST-1...${driver(
        28, 
        6    
      )}")   
  
  
      println(s"TEST-2...${driver(
        33, 
        6    
      )}")   
  
  
      println(s"TEST-3...${driver(
        23, 
        6    
      )}")   
  
  
      println(s"TEST-4...${driver(
        84, 
        8    
      )}")   
  
  
      println(s"TEST-5...${driver(
        31, 
        6    
      )}")   
  
  
      println(s"TEST-6...${driver(
        48, 
        7    
      )}")   
  
  
      println(s"TEST-7...${driver(
        46, 
        7    
      )}")   
  
  
      println(s"TEST-8...${driver(
        45, 
        7    
      )}")   
  
  
      println(s"TEST-9...${driver(
        90, 
        9    
      )}")   
  
  }
  
source_py: def maximum_games_played_winner(N):
      dp = [0 for i in range(N)]
      dp[0] = 1
      dp[1] = 2
      i = 1
      while (dp[i] <= N):
          i = (i + 1)
          dp[i] = (dp[(i - 1)] + dp[(i - 2)])
      return (i - 1)
source_cpp: int maximum_games_played_winner(int N) {
    int dp [ N ];
    dp [ 0 ] = 1;
    dp [ 1 ] = 2;
    int i = 2;
    do {
      dp [ i ] = dp [ i - 1 ] + dp [ i - 2 ];
    }
    while ( dp [ i ++ ] <= N );
    return ( i - 2 );
  }