LeetCode/cs/minimum-bit-flips-to-convert-number.cs

4 lines
105 B
C#
Raw Permalink Normal View History

public class Solution {
public int MinBitFlips(int start, int goal) => int.PopCount(start ^ goal);
}