github / github/gemoji

Метод 2 (битовая магия):

Open
#324 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Ruby
Stars
4.5k
Forks
802
PR merge metrics
No merged PRs in 30d

Description

def is_power_of_two_bit(digit):
return digit > 0 and (digit & (digit - 1)) == 0

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.