title: Position Of Rightmost Set Bit 1
signature: positionOfRightmostSetBit1(n) {
test_code: import 'dart:convert';
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  bool validateSolution(int actual, int expected){
      return actual.toString() == expected.toString();
  }
  
  String driver(n, int expected){
      try
      {
          if (validateSolution(PLACEHOLDER_FN_NAME(n), expected)){
              return "PASSED";
          }
          return "FAILED";
      }catch(exception_object){
          return exception_object.runtimeType.toString();
      }
  }
  
  int main() {
  
      print("TEST-0...${driver(
          17, 
          1)
      }");
  
      print("TEST-1...${driver(
          97, 
          1)
      }");
  
      print("TEST-2...${driver(
          73, 
          1)
      }");
  
      print("TEST-3...${driver(
          68, 
          3)
      }");
  
      print("TEST-4...${driver(
          6, 
          2)
      }");
  
      print("TEST-5...${driver(
          84, 
          3)
      }");
  
      print("TEST-6...${driver(
          72, 
          4)
      }");
  
      print("TEST-7...${driver(
          66, 
          2)
      }");
  
      print("TEST-8...${driver(
          57, 
          1)
      }");
  
      print("TEST-9...${driver(
          11, 
          1)
      }");
  
      return 0;
  }
source_py: def position_of_rightmost_set_bit_1(n):
      position = 1
      m = 1
      while (not (n & m)):
          m = (m << 1)
          position += 1
      return position
source_cpp: int position_of_rightmost_set_bit_1(int n) {
    int position = 1;
    int m = 1;
    while ( ! ( n & m ) ) {
      m = m << 1;
      position ++;
    }
    return position;
  }