• + 0 comments

    because 'n' is too large to allocate for static array. (the maximum size of static array is different by complier). so we allocate dynamic array of size 'n+1'.