{"id":17,"date":"2020-07-15T13:11:34","date_gmt":"2020-07-15T06:11:34","guid":{"rendered":"https:\/\/luthfishahab.com\/?p=8"},"modified":"2020-07-15T13:11:34","modified_gmt":"2020-07-15T06:11:34","slug":"finding-the-index-of-the-minimum-element-in-an-array","status":"publish","type":"post","link":"https:\/\/notes.its.ac.id\/luthfishahab\/finding-the-index-of-the-minimum-element-in-an-array\/","title":{"rendered":"Finding the index of the minimum element in an array"},"content":{"rendered":"\n<p>In this post, I provide a simple code for finding the index of the minimum element in an array.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>public int getIndexOfMin(int a&#091;]) {\n    int index = 0;\n    int min = a&#091;0];\n    for(int i = 1; i &lt; a.length; i++) {\n        if(min &gt; a&#091;i]) {\n            min = a&#091;i];\n            index = i;\n        }\n    }\n    return index;\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>In this post, I provide a simple code for finding the index of the minimum element in an array.<\/p>\n","protected":false},"author":18,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-17","post","type-post","status-publish","format-standard","hentry","category-java"],"_links":{"self":[{"href":"https:\/\/notes.its.ac.id\/luthfishahab\/wp-json\/wp\/v2\/posts\/17","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/notes.its.ac.id\/luthfishahab\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/notes.its.ac.id\/luthfishahab\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/notes.its.ac.id\/luthfishahab\/wp-json\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/notes.its.ac.id\/luthfishahab\/wp-json\/wp\/v2\/comments?post=17"}],"version-history":[{"count":0,"href":"https:\/\/notes.its.ac.id\/luthfishahab\/wp-json\/wp\/v2\/posts\/17\/revisions"}],"wp:attachment":[{"href":"https:\/\/notes.its.ac.id\/luthfishahab\/wp-json\/wp\/v2\/media?parent=17"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/notes.its.ac.id\/luthfishahab\/wp-json\/wp\/v2\/categories?post=17"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/notes.its.ac.id\/luthfishahab\/wp-json\/wp\/v2\/tags?post=17"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}