• + 0 comments

    Is this not O(n+k) time and O(n) aux space? Maybe I'm just not understanding C but doesn't this allocate an O(n) array:

    long int *a=new long int[N+1]();