answersLogoWhite

0

AllQ&AStudy Guides
Best answer

dont knw........

This answer is:
Related answers

dont knw........

View page

Anton K. Schnyder has written:

'Ausservertragliches Haftpflichtrecht' -- subject(s): Torts, Proximate cause (Law), Liability (Law)

View page

I'm not sure how many compositions of Mozart are in the key of D minor. Off the top of my head I can name these: Piano Concerto No. 20, K. 466 Requiem, K. 626 Don Giovanni, K. 527 String Quartet No. 15, K. 421 Kyrie, K. 341

View page

#include < stdio.h >

#define SIZE 3

int main(char *argv[],int argc)

{

char list[3]={'a','b','c'};

int i,j,k;

for(i=0;i < SIZE;i++)

for(j=0;j < SIZE;j++)

for(k=0;k < SIZE;k++)

if(i!=j && j!=k && i!=k)

printf("c%c\n",list[i],list[j],list[k]);

return(0);

}

The code is very inefficient.If the length of the string is 5 then o(n) = n power 5 !!!!

a more efficient code is

#include<stdio.h>

void f(char *,int,int);

int main()

{

char s[]="abc";

f(s,0,2);

}

void f(char * a,int i,int n)

{

int j;

char ch;

if(i == n)

printf("%s\n",a);

else

{

for(j=i;j<=n;j++)

{

ch = a[i];

a[i] = a[j];

a[j] = ch;

f(a,i+1,n);

ch = a[i];

a[i] = a[j];

a[j] = ch;

}

}

}

View page

# Kevin # ... # ... Please add your own to the list, to help.

View page
Featured study guide
📓
See all Study Guides
✍️
Create a Study Guide
Search results