char * restoreString(char * s, int* indices, int indicesSize){ char* RetStr = (char*)calloc(indicesSize+1, sizeof(char)); for (int i = 0; i < indicesSize; i++)RetStr[indices[i]] = s[i]; return RetStr; }