My C Solution stuck in the testcase [-6,10,184] and don't know why

  • 0

    I have no idea why my solution stuck in this testcase [-6,10,184]. I thought there is only reset output I should pay attention to. And my reset output should be fine. About the shuffle output, it could be any permutation of the [-6,10,184]. Did I misunderstand anything?

    int* solutionShuffle(Solution* obj, int *returnSize) {
            return NULL;
        for(int i=0;i<obj->size;i++){
            int r1 = rand()%obj->size;
        return obj->nums;

  • 0

    srand() should be called only once per "Solution", calling it repeatedly does not give you a list of random numbers.

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.