filmov
tv
LeetCode 30 Days Challenge, 23th - Bitwise AND in [m, n]
Показать описание
Time: O(log_2(max(m, n))), Space: O(1)
Sorry for a typo in Google doc explanation that took me 1 min to figure out shift_bit should be ++ rather than = 3.
Actually, loe-level bitwise programming is sometimes pretty interesting, where one can dive into more detail in basic computer math, so did I have program in STM32 Embedde C before, which is quite fun.
Source code at
Sorry for a typo in Google doc explanation that took me 1 min to figure out shift_bit should be ++ rather than = 3.
Actually, loe-level bitwise programming is sometimes pretty interesting, where one can dive into more detail in basic computer math, so did I have program in STM32 Embedde C before, which is quite fun.
Source code at