@flyerCheng
This is variable-length arrays which are allowed in C99.
But variable-length arrays are subsequently relegated in C11 to a conditional feature which implementations are not required to support.

@KarlBaoJJJ But what if the maximum and the minimum is of a big absolute value, let the maximum be 2^31, and suppose an integer takes 4 bytes, a NegaArr takes up to 2^33 bytes = 2^3 Gigabytes. The code might not work for such cases.

i think it did not need four array, just one will be ok, after get the maxPosiNum and minNegaNum, all numbers translate into 0 ~ (maxPosiNum - minNegaNum), and use the hashtable idea, just while do-loop;