Junior post 可能係。Senior post未計bonus同股票已經可以高過呢個數(assume扣1/3稅)。
Code4Food2020-05-15 08:22:55
1. For an n-element set, the number of subset is 2^n
2. There is a trivial way to map integers in [0,1,.. 2^n-1] to a subset of an n-element set.
3. For practical reasons, I think n < 64. Homework question: if you can print one subset in 1 cycle at 3GHz. How long does it take to print out all 2^64 subset?
4. Look up the man page of ffs(). On many modern CPUs, there are instruction to find the first set bit of an integer in a few machine cycles.
5 Homework question: putting 1, 2, 3 and 4 together.
手一黏便緊(UTC+92020-05-15 08:25:00
我估佢個output要sort by set length
作code家2020-05-15 08:27:31
應該咁講
以前 development scale 無咁大
唔少人水平只係停留寫 script / 好簡單 program
更加唔好講 system design
請人既唔會識分你係咪 technical