• + 0 comments

    You don't need to handle if (n<2) as n is bounded by 1 and using integer division then 1/2->0 as it's truncated when implicit casting.