comefrom: <awangdev>Coins in a Line_3.java
code: public boolean firstWillWin(int n) {
          if (n <= 0) {
              return false;
          }
          if (n <= 2) {
              return true;
          }
  
          int start = 0;
          int mid = 1;
          int end = 2;
          boolean[] dp = new boolean[3];
          dp[start] = false; 
          dp[mid] = true;
          
          for (int i = 2; i <= n; i++) {
              dp[end] = !dp[start] || !dp[mid];
              if (i != n) {
                  start = (start + 1) % 3;
                  mid = (mid + 1) % 3;
                  end = (end + 1) % 3;
              }
          }
          return dp[end];
      }
masked: public boolean var_0 ( int var_1 ) {
    if ( var_1 <= 0 ) {
      return false ;
    }
    if ( var_1 <= 2 ) {
      return true ;
    }
    int var_4 = 0 ;
    int var_6 = 1 ;
    int var_7 = 2 ;
    boolean [ ] var_10 = new boolean [ 3 ] ;
    var_10 [ var_4 ] = false ;
    var_10 [ var_6 ] = true ;
    for ( int var_11 = 2 ;
    var_11 <= var_1 ;
    var_11 ++ ) {
      var_10 [ var_7 ] = ! var_10 [ var_4 ] || ! var_10 [ var_6 ] ;
      if ( var_11 != var_1 ) {
        var_4 = ( var_4 + 1 ) % 3 ;
        var_6 = ( var_6 + 1 ) % 3 ;
        var_7 = ( var_7 + 1 ) % 3 ;
      }
    }
    return var_10 [ var_7 ] ;
  }
  