• + 0 comments
    public static int bitwiseAnd(int N, int K)
    {
        if (((K - 1) | K) <= N)
        {
            return K - 1;
        }
        return K - 2;
    }
    
        Corrected for C#