{"id":63,"date":"2011-04-08T11:27:47","date_gmt":"2011-04-08T05:27:47","guid":{"rendered":"http:\/\/ujjalruet.wordpress.com\/?p=63"},"modified":"2011-04-08T11:27:47","modified_gmt":"2011-04-08T05:27:47","slug":"next-permutation","status":"publish","type":"post","link":"https:\/\/blog.ujjal.net\/?p=63","title":{"rendered":"NEXT PERMUTATION"},"content":{"rendered":"<p>In the way of programming there is some problems on thye basis of finding the permutation. Today I am giving a sample to create all permutations of an string.<\/p>\n<p><code><br \/>\n\/\/ next_permutation<br \/>\n#include &lt;stdio.h&gt;<br \/>\n#include &lt;string.h&gt;<br \/>\n#include &lt;iostream&gt;<br \/>\n#include &lt;algorithm&gt;<\/p>\n<p>using namespace std;<\/p>\n<p>int main () {<\/p>\n<p>  int n,i,l;<br \/>\n  char myints[1000];<\/p>\n<p>  gets(myints);<br \/>\n    l=strlen(myints);<br \/>\n sort (myints,myints+l);<\/p>\n<p>do {<br \/>\n    cout &lt;&lt; myints&lt;&lt; endl;<br \/>\n  } while ( next_permutation (myints,myints+l) );<\/p>\n<p>  return 0;<br \/>\n}<br \/>\n<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the way of programming there is some problems on thye basis of finding the permutation. Today I am giving a sample to create all permutations of an string. \/\/ next_permutation #include &lt;stdio.h&gt; #include &lt;string.h&gt; #include &lt;iostream&gt; #include &lt;algorithm&gt; using namespace std; int main () { int n,i,l; char myints[1000]; gets(myints); l=strlen(myints); sort (myints,myints+l); do &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.ujjal.net\/?p=63\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;NEXT PERMUTATION&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[8],"tags":[],"class_list":["post-63","post","type-post","status-publish","format-standard","hentry","category-programming-with-c-2"],"_links":{"self":[{"href":"https:\/\/blog.ujjal.net\/index.php?rest_route=\/wp\/v2\/posts\/63","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ujjal.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ujjal.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ujjal.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ujjal.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=63"}],"version-history":[{"count":0,"href":"https:\/\/blog.ujjal.net\/index.php?rest_route=\/wp\/v2\/posts\/63\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.ujjal.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=63"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ujjal.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=63"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ujjal.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=63"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}