title: Replace Character C1 C2 C2 C1 String S
signature: def replaceCharacterC1C2C2C1StringS(s: String, c1: Char, c2: Char) = {
test_code: import scala.collection.mutable.HashMap
  import scala.collection.immutable.HashSet
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  
  // TESTING CODE 
  // ============================================
  def validateSolution(actual: String , expected: String): Boolean = {
      actual.toString == expected.toString
  }
  
  def driver(s: String, c1: Char, c2: Char, expected: String): String = {
      try {
          if (validateSolution(PLACEHOLDER_FN_NAME(s, c1, c2),expected)) {
              "PASSED"
          } else{
              "FAILED"
          }
      }catch{
          case e: Exception => {e.getClass.getName}
      }
  
  }
  object QuestionEvaluator extends App {
  
      println(s"TEST-0...${driver(
        "IZTSMw j", 'W', 'k', 
        "IZTSMw j"    
      )}")   
  
  
      println(s"TEST-1...${driver(
        "7288334", '6', '9', 
        "7288334"    
      )}")   
  
  
      println(s"TEST-2...${driver(
        "010110000", '1', '1', 
        "010110000"    
      )}")   
  
  
      println(s"TEST-3...${driver(
        "b gJX", 't', 'P', 
        "b gJX"    
      )}")   
  
  
      println(s"TEST-4...${driver(
        "734", '4', '4', 
        "734"    
      )}")   
  
  
      println(s"TEST-5...${driver(
        "1", '1', '1', 
        "1"    
      )}")   
  
  
      println(s"TEST-6...${driver(
        "xCaUKdhA", 'X', 'S', 
        "xCaUKdhA"    
      )}")   
  
  
      println(s"TEST-7...${driver(
        "4370992644981", '5', '6', 
        "4370992544981"    
      )}")   
  
  
      println(s"TEST-8...${driver(
        "01010", '0', '1', 
        "10101"    
      )}")   
  
  
      println(s"TEST-9...${driver(
        "ZNIFGshaWA", 'Q', 'x', 
        "ZNIFGshaWA"    
      )}")   
  
  }
  
source_py: def replace_character_c1_c2_c2_c1_string_s(s, c1, c2):
      l = len(s)
      for i in range(l):
          if (s[i] == c1):
              s = ((s[0:i] + c2) + s[(i + 1):])
          elif (s[i] == c2):
              s = ((s[0:i] + c1) + s[(i + 1):])
      return s
source_cpp: string replace_character_c1_c2_c2_c1_string_s(string s, char c1, char c2) {
    int l = s . length ( );
    for ( int i = 0;
    i < l;
    i ++ ) {
      if ( s [ i ] == c1 ) s [ i ] = c2;
      else if ( s [ i ] == c2 ) s [ i ] = c1;
    }
    return s;
  }