Блог пользователя kn0ppers

Автор kn0ppers, история, 5 лет назад, По-английски

Hi all,

recently i attended a job interview where i got the following question:

Given x and y, find the number of integers such that for z in [1..x] z & y > 0?

Is there a faster way to compute this other than iterating through all the ints from [1..x]? Is there some sort of trick to compute this directly? I appreciate anyone taking the time to give me hints/tricks to compute this.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +11
  • Проголосовать: не нравится