SharanyaRMannan's blog

By SharanyaRMannan, history, 20 months ago, In English

hi i was just going thru the editorial of the contest, and was wondering the functionality of this LOOP:

for(int i = 29;i >= 1;i--) { if((n >> i) & 1) { f = 1; v.push_back(2); } else if(f) { v.push_back(1); } }

in ques 2 of the contest..

can anyone help me with this..?

  • Vote: I like it
  • 0
  • Vote: I do not like it

| Write comment?