{"id":287,"date":"2010-11-12T12:43:55","date_gmt":"2010-11-12T16:43:55","guid":{"rendered":"http:\/\/hw.minilinux.net\/?p=287"},"modified":"2010-11-12T12:43:55","modified_gmt":"2010-11-12T16:43:55","slug":"swap","status":"publish","type":"post","link":"https:\/\/hw.minilinux.net\/?p=287","title":{"rendered":"swap"},"content":{"rendered":"<p> Just now I was a little boring while working, so I started to try to write a quicksort, for the partition function it involved with the swap method.<\/p>\n<p>I know it could be the simplest way by using an extra memory, also it could be amazingly solved by using XOR or Substraction.<\/p>\n<p>But until now I just realized that the last two methods, although without the cost of extra memory, could be problem if you are swapping the same thing of the same address.<\/p>\n<p>Just write here to remember, something you think you are familiar enough, answer is still not enough!!!<\/p>\n<p>PS: the south park yesterday is kinda lame, I didn&#8217;t why they just put too much on Kenny. Also, I knew it, JB would be mocked!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Just now I was a little boring while working, so I started to try to write a quicksort, for the partition function it involved with the swap method. I know it could be the simplest way by using an extra memory, also it could be amazingly solved by using XOR or Substraction. But until now &hellip; <a href=\"https:\/\/hw.minilinux.net\/?p=287\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;swap&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-287","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/hw.minilinux.net\/index.php?rest_route=\/wp\/v2\/posts\/287","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hw.minilinux.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hw.minilinux.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hw.minilinux.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hw.minilinux.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=287"}],"version-history":[{"count":1,"href":"https:\/\/hw.minilinux.net\/index.php?rest_route=\/wp\/v2\/posts\/287\/revisions"}],"predecessor-version":[{"id":288,"href":"https:\/\/hw.minilinux.net\/index.php?rest_route=\/wp\/v2\/posts\/287\/revisions\/288"}],"wp:attachment":[{"href":"https:\/\/hw.minilinux.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=287"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hw.minilinux.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=287"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hw.minilinux.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=287"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}