Full threadaarchi·Even better, store array A instead as a bit set, take the complement, then return the number of trailing zeros plus one.View on HN