Writing Programs - muneshwar/target2021 GitHub Wiki

// Writing the program to find the longest sequence of the character in a given string BBBAAFFFKKGGGYY

maxCount = 0; maxChar = 0; String testString = "BBBAAFFFKKGGGYY"; for( int i = 0; i < testString.length() ; i++ ) {

if( i == 0 ) { previous = testString.getChar(0); current = testString.getChar(0); count = 1; } else {

if( current == previous ) {

} }

}