Function to return max possible operation of the given type that can be performed on str
< ? php function maxOperations ( $ str ) { $ i = $ g = $ gk = $ gks = 0 ; for ( $ i = 0 ; $ i < strlen ( $ str ) ; $ i ++ ) { if ( $ str [ $ i ] == ' g ' ) {