✅ 0(1) Efficient Solution
Code\nswift\nstruct Solution {\n    @_optimize(speed)\n    func minChanges(_ n: Int, _ k: Int) -> Int {\n        k & ~n == 0 ? n.nonzeroBitCount - k.nonzeroBitC
# Code\n```swift\nstruct Solution {\n    @_optimize(speed)\n    func minChanges(_ n: Int, _ k: Int) -> Int {\n        k & ~n == 0 ? n.nonzeroBitCount - k.nonzeroBitCount : -1\n    }\n}\n```
['Bit Manipulation', 'Swift']