title: Decimal Binary Conversion Without Using Arithmetic Operators
signature: def decimalBinaryConversionWithoutUsingArithmeticOperators(n: Int) = {
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(n: Int, expected: String): String = {
      try {
          if (validateSolution(PLACEHOLDER_FN_NAME(n),expected)) {
              "PASSED"
          } else{
              "FAILED"
          }
      }catch{
          case e: Exception => {e.getClass.getName}
      }
  
  }
  object QuestionEvaluator extends App {
  
      println(s"TEST-0...${driver(
        35, 
        "100011"    
      )}")   
  
  
      println(s"TEST-1...${driver(
        17, 
        "10001"    
      )}")   
  
  
      println(s"TEST-2...${driver(
        8, 
        "1000"    
      )}")   
  
  
      println(s"TEST-3...${driver(
        99, 
        "1100011"    
      )}")   
  
  
      println(s"TEST-4...${driver(
        57, 
        "111001"    
      )}")   
  
  
      println(s"TEST-5...${driver(
        39, 
        "100111"    
      )}")   
  
  
      println(s"TEST-6...${driver(
        99, 
        "1100011"    
      )}")   
  
  
      println(s"TEST-7...${driver(
        14, 
        "1110"    
      )}")   
  
  
      println(s"TEST-8...${driver(
        22, 
        "10110"    
      )}")   
  
  
      println(s"TEST-9...${driver(
        7, 
        "111"    
      )}")   
  
  }
  
source_py: def decimal_binary_conversion_without_using_arithmetic_operators(n):
      if (n == 0):
          return '0'
      bin = ''
      while (n > 0):
          if ((n & 1) == 0):
              bin = ('0' + bin)
          else:
              bin = ('1' + bin)
          n = (n >> 1)
      return bin
source_cpp: string decimal_binary_conversion_without_using_arithmetic_operators(int n) {
    if ( n == 0 ) return "0";
    string bin = "";
    while ( n > 0 ) {
      bin = ( ( n & 1 ) == 0 ? '0' : '1' ) + bin;
      n >>= 1;
    }
    return bin;
  }