New answers tagged

0

Mathematica, 44 bytes I feel like I can trim off a few more bytes, though I'm not sure how yet. We save space by using an assignment within If, using #0 for pure function recursion, and using infix notation when possible. If[(k=BitAnd[#,#/2])>0,#0@k,Log2@#~BitOr~0]& Try it online!


0

Python 3, 83 bytes len(bin(num)[2:].split('1'*(max(list(map(len,bin(num)[2:].split('0'))))))[1]) Try it online! It does not support the condition that two or more arrays of 1s are longest.


Top 50 recent answers are included