We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
The following program gives correct output in code:block editor installed on my computer. but here in the Hackerrank compiler gives me Segmentation fault on one input and my other inputs are wrong. why?
int compareStringArr(char** strArr,int size){
for(int i=0;iSstored = NULL;
int next_permutation(int n, char **s)
{
/
* Complete this method
* Return 0 when there is no next permutation and 1 otherwise
* Modify array s to its next permutation
*/
static int idx = 1;
static int tempidx = 1;
Permutations of Strings
You are viewing a single comment's thread. Return to all comments →
The following program gives correct output in code:block editor installed on my computer. but here in the Hackerrank compiler gives me Segmentation fault on one input and my other inputs are wrong. why?
int compareStringArr(char** strArr,int size){ for(int i=0;iSstored = NULL; int next_permutation(int n, char **s) { / * Complete this method * Return 0 when there is no next permutation and 1 otherwise * Modify array s to its next permutation */ static int idx = 1; static int tempidx = 1;
}