Click here to Skip to main content
15,895,011 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
k ← 0
n ← length(str)
for each permutation of str
j ← 1
while (j ≤ n)
k ← k + 1
j ← j + 1
print k

What I have tried:

i have tried to find out the answer what i am getting is n^2.
Posted
Comments
OriginalGriff 29-Jun-16 3:10am    
Without the code you implemented the algorithm with, we have no idea if you did it right...
Use the "Improve question" widget to edit your question and provide better information.

1 solution

Your questions isnt only vague, but looks like a homework (which class?) to learn the language C.

Here is a fine C-Tutorial, where you can learn some basic knowledge. I recommand you to install and use the Visual Studio IDE.

Good luck.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900