pub fn is_power_of_two(n: u64) -> boolExpand description
n ikkining darajasimi? (1, 2, 4, 8, …)
G’oya: ikkining darajasida faqat bitta 1 bit bor, shuning uchun
n & (n - 1) == 0.
§Misol
use rust_algorithms::numbers::is_power_of_two;
assert!(is_power_of_two(64));
assert!(!is_power_of_two(0));
assert!(!is_power_of_two(48));