Python icon indicating copy to clipboard operation
Python copied to clipboard

feat: add count_bits algorithm with doctests

Open NA-V10 opened this issue 1 month ago • 0 comments

Summary

This PR adds a new bit manipulation algorithm count_bits that returns the number of set bits (1s) in a non-negative integer.

Highlights

  • Pure Python bitwise implementation
  • Includes doctests following project standards
  • Validates against negative input
  • No external dependencies

Checklist

  • [x] Doctests added
  • [x] Code follows repository format
  • [x] No breaking changes

Thank you!

NA-V10 avatar Nov 21 '25 10:11 NA-V10