{"id":3143,"date":"2015-07-16T08:09:05","date_gmt":"2015-07-16T07:09:05","guid":{"rendered":"https:\/\/abcdr.guyader.pro\/?p=3143"},"modified":"2018-04-08T00:02:07","modified_gmt":"2018-04-07T23:02:07","slug":"comment-trier-un-vecteur-numerique-dans-lordre-croissant-ou-decroissant-sort-rev","status":"publish","type":"post","link":"https:\/\/thinkr.fr\/abcdr\/comment-trier-un-vecteur-numerique-dans-lordre-croissant-ou-decroissant-sort-rev\/","title":{"rendered":"Comment trier un vecteur num\u00e9rique dans l\u2019ordre croissant ou d\u00e9croissant ? sort, rev."},"content":{"rendered":"<pre><code><br \/>y &lt;- sample(15)\n\n\u00a0[1] 10\u00a0 2 12 14\u00a0 7\u00a0 5\u00a0 6\u00a0 8\u00a0 3\u00a0 4\u00a0 9 13\u00a0 1 15 11\n\n#y est un veteur d'entiers\n\n\u00a0\n\nsort(y)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 #On trie le vecteur dans l'ordre croissant\n\n\u00a0[1]\u00a0 1\u00a0 2\u00a0 3\u00a0 4\u00a0 5\u00a0 6\u00a0 7\u00a0 8\u00a0 9 10 11 12 13 14 15\n\n\u00a0\n\nrev(sort(y))\u00a0\u00a0 #On trie le vecteur dans l'ordre d\u00e9croissant\n\n\u00a0[1] 15 14 13 12 11 10\u00a0 9\u00a0 8\u00a0 7\u00a0 6\u00a0 5\u00a0 4\u00a0 3\u00a0 2\u00a0 1<br \/><br \/> <\/code><\/pre>\n<p>\u00a0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>y &lt;- sample(15) \u00a0[1] 10\u00a0 2 12 14\u00a0 7\u00a0 5\u00a0 6\u00a0 8\u00a0 3\u00a0 4\u00a0 9 13\u00a0 1 15 11 #y est un veteur d&rsquo;entiers \u00a0 sort(y)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 #On trie le vecteur dans l&rsquo;ordre croissant \u00a0[1]\u00a0 1\u00a0 2\u00a0 3\u00a0 4\u00a0 5\u00a0 6\u00a0 7\u00a0 8\u00a0 9 10 11 12 13 14 15 \u00a0 rev(sort(y))\u00a0\u00a0 #On trie le vecteur dans l&rsquo;ordre d\u00e9croissant \u00a0[1] 15 14 13 12 11 10\u00a0 9\u00a0 8\u00a0 7\u00a0 6\u00a0 5\u00a0 4\u00a0 3\u00a0 2\u00a0 1 \u00a0<a class=\"more-link\" href=\"https:\/\/thinkr.fr\/abcdr\/comment-trier-un-vecteur-numerique-dans-lordre-croissant-ou-decroissant-sort-rev\/\">Read More &rarr;<\/a><\/p>\n","protected":false},"author":13,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"content-type":"","rop_custom_images_group":[],"rop_custom_messages_group":[],"rop_publish_now":"initial","rop_publish_now_accounts":{"twitter_399453572_399453572":""},"rop_publish_now_history":[],"rop_publish_now_status":"pending","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[8],"tags":[],"class_list":{"0":"entry","1":"post","2":"publish","3":"author-helene","4":"post-3143","6":"format-standard","7":"category-fonctions-utiles"},"acf":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p9O7Sx-OH","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/thinkr.fr\/abcdr\/wp-json\/wp\/v2\/posts\/3143","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thinkr.fr\/abcdr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thinkr.fr\/abcdr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thinkr.fr\/abcdr\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/thinkr.fr\/abcdr\/wp-json\/wp\/v2\/comments?post=3143"}],"version-history":[{"count":2,"href":"https:\/\/thinkr.fr\/abcdr\/wp-json\/wp\/v2\/posts\/3143\/revisions"}],"predecessor-version":[{"id":4282,"href":"https:\/\/thinkr.fr\/abcdr\/wp-json\/wp\/v2\/posts\/3143\/revisions\/4282"}],"wp:attachment":[{"href":"https:\/\/thinkr.fr\/abcdr\/wp-json\/wp\/v2\/media?parent=3143"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thinkr.fr\/abcdr\/wp-json\/wp\/v2\/categories?post=3143"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thinkr.fr\/abcdr\/wp-json\/wp\/v2\/tags?post=3143"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}