title: Basic And Extended Euclidean Algorithms
signature: def basicAndExtendedEuclideanAlgorithms(a: Int, b: 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(a: Int, b: Int, expected: Int): String = {
      try {
          if (validateSolution(PLACEHOLDER_FN_NAME(a, b),expected)) {
              "PASSED"
          } else{
              "FAILED"
          }
      }catch{
          case e: Exception => {e.getClass.getName}
      }
  
  }
  object QuestionEvaluator extends App {
  
      println(s"TEST-0...${driver(
        46, 89, 
        1    
      )}")   
  
  
      println(s"TEST-1...${driver(
        26, 82, 
        2    
      )}")   
  
  
      println(s"TEST-2...${driver(
        40, 12, 
        4    
      )}")   
  
  
      println(s"TEST-3...${driver(
        58, 4, 
        2    
      )}")   
  
  
      println(s"TEST-4...${driver(
        25, 44, 
        1    
      )}")   
  
  
      println(s"TEST-5...${driver(
        2, 87, 
        1    
      )}")   
  
  
      println(s"TEST-6...${driver(
        8, 65, 
        1    
      )}")   
  
  
      println(s"TEST-7...${driver(
        21, 87, 
        3    
      )}")   
  
  
      println(s"TEST-8...${driver(
        82, 10, 
        2    
      )}")   
  
  
      println(s"TEST-9...${driver(
        17, 61, 
        1    
      )}")   
  
  }
  
source_py: def basic_and_extended_euclidean_algorithms(a, b):
      if (a == 0):
          return b
      return basic_and_extended_euclidean_algorithms((b % a), a)
source_cpp: int basic_and_extended_euclidean_algorithms(int a, int b) {
    if ( a == 0 ) return b;
    return basic_and_extended_euclidean_algorithms ( b % a, a );
  }