title: Position Of Rightmost Set Bit 1
signature: pub fn position_of_rightmost_set_bit_1(n: i32) -> i32 {
test_code: use std::collections::HashMap;
  use std::collections::HashSet;
  use std::cmp::*;
  use std::collections::*;
  use std::fmt::*; 
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  pub fn validate_solution(actual: i32, expected: i32)->bool{
  return actual==expected
  }
  pub fn driver(n: i32, expected: i32)->String{
      if validate_solution(PLACEHOLDER_FN_NAME(n), expected) {
        return "PASSED".to_string();
      };
      return "FAILED".to_string();
  
  }
  
  fn main() {
      println!("TEST-0...{}", driver(
        17, 
        1
      ));
      
      println!("TEST-1...{}", driver(
        97, 
        1
      ));
      
      println!("TEST-2...{}", driver(
        73, 
        1
      ));
      
      println!("TEST-3...{}", driver(
        68, 
        3
      ));
      
      println!("TEST-4...{}", driver(
        6, 
        2
      ));
      
      println!("TEST-5...{}", driver(
        84, 
        3
      ));
      
      println!("TEST-6...{}", driver(
        72, 
        4
      ));
      
      println!("TEST-7...{}", driver(
        66, 
        2
      ));
      
      println!("TEST-8...{}", driver(
        57, 
        1
      ));
      
      println!("TEST-9...{}", driver(
        11, 
        1
      ));
      
  }
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;
  }