Skip to content

Instantly share code, notes, and snippets.

View yangtaeho's full-sized avatar

yangtaeho yangtaeho

View GitHub Profile
@yangtaeho
yangtaeho / 2_1_egypt_product.js
Last active April 28, 2022 15:03
study_algorithm_ramble_c2_220428
const odd = n=> !!(n & 0x1);
const half = n=>n >> 1;
{
// 내가 짠거
const odd = n=>half(n) == half(n - 1);
const half = n=>Math.floor(n/2);
}
{
// hika pp. 29
// n == parseInt(n/2) + parseInt(n/2); // 짝수인가? #1