
{"id":15681,"date":"2014-03-30T13:36:23","date_gmt":"2014-03-30T13:36:23","guid":{"rendered":"http:\/\/www.beautifulwork.org\/?p=15681"},"modified":"2014-03-30T13:36:23","modified_gmt":"2014-03-30T13:36:23","slug":"bubble-sort-using-ruby-array-size-100","status":"publish","type":"post","link":"https:\/\/www.trueangle.org\/index.php\/2014\/03\/30\/bubble-sort-using-ruby-array-size-100\/","title":{"rendered":"BUBBLE SORT USING  RUBY ARRAY SIZE 100"},"content":{"rendered":"<pre>\n#!\/usr\/bin\/ruby\n \n=begin\n\n bubble sort in php  by detour@metalshell.com\n Generate random numbers then sort them.\n Ported to Ruby by Jeffrin Jose T  \n Licensed : GPL\n=end\n\n\narray_size = 100\nx = 0\ny = 0\nz = 0\nhold = 0\nran = Array.new(array_size)\n\nwhile x &lt; array_size  \n    ran[x] = rand(1..1000)\n    x +=1\nend\n\nx = 0\nwhile x &lt; array_size\ny = 0\nwhile y &lt; array_size\n   if ran[x] &lt; ran[y]\n     hold = ran[x]\n     ran[x] = ran[y]\n     ran[y] = hold\n   end\ny +=1\nend\nx +=1\nend\n\n=begin\n\nwhile z &lt; array_size\nputs ran[z]\n   z +=1\nend\n\n=end\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>#!\/usr\/bin\/ruby =begin bubble sort in php by detour@metalshell.com Generate random numbers then sort them. Ported to Ruby by Jeffrin Jose T Licensed : GPL =end array_size = 100 x = 0 y = 0 z = 0 hold = 0 ran = Array.new(array_size) while x &lt; array_size ran[x] = rand(1..1000) x +=1 end x = &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.trueangle.org\/index.php\/2014\/03\/30\/bubble-sort-using-ruby-array-size-100\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;BUBBLE SORT USING  RUBY ARRAY SIZE 100&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[91,97,108],"tags":[420,501],"_links":{"self":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/15681"}],"collection":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/comments?post=15681"}],"version-history":[{"count":0,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/15681\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/media?parent=15681"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/categories?post=15681"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/tags?post=15681"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}