0ms Shifting operator and "& operator
IntuitionTo transform n into k, we can only unset bits in n. This means:
If a bit in n is set (1), we can change it to unset (0).
If a bit in n is already unset
## **Intuition**  
To transform `n` into `k`, we can only **unset** bits in `n`. This means:  

1. If a bit in `n` is **set** (`1`), we can change it to **unset** (`0`).  
2. If a bit in `n` is already **unset** (`0`), we **cannot** change it to `1`.  
3. Our goal is to determine the **minimum** number of bit unsets needed to make `n` equal to `k`.  
4. If it's **impossible** to achieve `k` using this operation, return `-1`.  

---

## **Approach**  
We process `n` and `k` bit by bit, starting from the least significant bit (LSB):  

1. **Bitwise Right Shift:**  
   - Keep shifting `n` and `k` to the right until they become equal.  

2. **Bitwise Comparison:**  
   - If the current bit of `n` is `1` and the corresponding bit in `k` is `0`, we **unset** this bit (increment `count`).  
   - If the current bit of `n` is `0` and the corresponding bit in `k` is `1`, we **cannot** convert `n` into `k`, so return `-1`.  

3. **Repeat until `n == k`**, keeping track of the number of changes required.  

---

## **Complexity Analysis**  
- **Time Complexity:** \( O(\text{position of leftmost set bit}) \)  
  - The worst case is proportional to the number of bits in `n`, as we keep right-shifting until `n` and `k` match.  
- **Space Complexity:** \( O(1) \)  
  - Only a few integer variables are used, making the space usage constant.  

---

## **Code Implementation**  

```cpp
class Solution {
public:
    int minChanges(int n, int k) {
        int count = 0;

        while (n != k) {
            if ((n & 1) && !(k & 1)) {
                count++;  // Unset this bit
            } else if (!(n & 1) && (k & 1)) {
                return -1;  // Impossible case
            }

            n = n >> 1;
            k = k >> 1;
        }

        return count;
    }
};

['Bit Manipulation', 'C++']