Skip to content
makolyte

makolyte

Solve real coding problems

  • About
  • C#
  • SQL

bitwise-and

Codewars – Bit Counting solution

01/25/202503/09/2020 by Mak

In this article, I’ll explain how to solve the Bit Counting algorithm challenge on Codewars. Problem statement: Given a 32-bit signed integer, how many set bits are there? Ex: The number 15 has four bits set. Approach How do I know if a bit is set? A bit can either be 0 or 1. A … Read more

Categories C# Tags algorithm, bitwise-and, bitwise-shift, for-loop, hackerrank, increment
About โ€ข Privacy Policy
© 2025 makolyte