{"id":392,"date":"2022-06-09T02:36:18","date_gmt":"2022-06-09T02:36:18","guid":{"rendered":"https:\/\/datmt.com\/?p=392"},"modified":"2022-06-09T02:36:19","modified_gmt":"2022-06-09T02:36:19","slug":"selection-sort-in-java","status":"publish","type":"post","link":"https:\/\/datmt.com\/fundamental\/selection-sort-in-java\/","title":{"rendered":"Selection sort in Java"},"content":{"rendered":"\n<p>Selection sort is one of the simple sorting algorithms. Its time complexity is O(n2).<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Selection sort fundamental<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>Two nested loops<\/li><li>Involves swapping<\/li><li>At the end of each iteration, the lowest element is at the right position<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Selection sort steps<\/h2>\n\n\n\n<p>As mentioned above, there are two loops in this algorithm. Essentially, the steps as below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"656\" height=\"369\" sizes=\"auto, (max-width: 656px) 100vw, 656px\" src=\"https:\/\/datmt.com\/wp-content\/uploads\/2022\/06\/image-2.png\" alt=\"Selection sort step by step\" class=\"wp-image-395\" srcset=\"https:\/\/datmt.com\/wp-content\/uploads\/2022\/06\/image-2.png 656w, https:\/\/datmt.com\/wp-content\/uploads\/2022\/06\/image-2-300x169.png 300w\" \/><\/figure>\n\n\n\n<p>Let&#8217;s consider an example to boost our understanding.<\/p>\n\n\n\n<p>This is the initial array:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"240\" height=\"89\" sizes=\"auto, (max-width: 240px) 100vw, 240px\" src=\"https:\/\/datmt.com\/wp-content\/uploads\/2022\/06\/image-1.png\" alt=\"Initial array, selection sort\" class=\"wp-image-394\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Iteration 1<\/h3>\n\n\n\n<p>We start the outer loop at index 0, assume it&#8217;s the index with the lowest value. <\/p>\n\n\n\n<p>At this stage we have:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-java&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Java&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;java&quot;}\">int i =0;\nint lowest_index = 0;<\/pre><\/div>\n\n\n\n<p>Now compare all values from 0+1 to 4-1 (array length -1).<\/p>\n\n\n\n<p>Compare 1 to 3, we found that 1 &lt; 3 so we update the lowest index<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-java&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Java&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;java&quot;}\">lowest_index = 1;<\/pre><\/div>\n\n\n\n<p>Next we compare the next value to value at lowest_index. We found that 2 > 1 and 4 > 1 so there is no update to lowest_index needed.<\/p>\n\n\n\n<p>At the end of this iteration, lowest_index = 1.<\/p>\n\n\n\n<p>Since lowest_index != i, then we swap them.<\/p>\n\n\n\n<p>This is the array at the first iteration:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"228\" height=\"76\" sizes=\"auto, (max-width: 228px) 100vw, 228px\" src=\"https:\/\/datmt.com\/wp-content\/uploads\/2022\/06\/image-3.png\" alt=\"selection sort, first iteration\" class=\"wp-image-396\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Iteration 2<\/h3>\n\n\n\n<p>At the beginning of this iteration, the values of i and lowest_index as below:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-java&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Java&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;java&quot;}\">i =1;\nlowest_index = 1;<\/pre><\/div>\n\n\n\n<p>The outer loop starts at index 1 (value 3).<\/p>\n\n\n\n<p>The inner loop starts at index 2 (value 2).<\/p>\n\n\n\n<p>Now we compare value at lowest_index with values at index 2. Since 2 &lt; 3, we update the lowest index:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-java&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Java&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;java&quot;}\">int lowest_index = 2;<\/pre><\/div>\n\n\n\n<p>We now compare the value at lowest_index with value at index 3 (4). Since 2 &lt; 4, we don&#8217;t need to update the lowest index.<\/p>\n\n\n\n<p>Since lowest_index != i, we swap them.<\/p>\n\n\n\n<p>At the end of this iteration, we have:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"232\" height=\"76\" sizes=\"auto, (max-width: 232px) 100vw, 232px\" src=\"https:\/\/datmt.com\/wp-content\/uploads\/2022\/06\/image-4.png\" alt=\"array at second iteration\" class=\"wp-image-397\"\/><\/figure>\n\n\n\n<p>It looks to us the array is sorted. However, the program doesn&#8217;t know that yet. We still need to do iteration 3.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Iteration 3<\/h3>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-java&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Java&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;java&quot;}\">i =2;\nlowest_index = 2;<\/pre><\/div>\n\n\n\n<p>Now we compare the value at index 3 (2 + 1 ) to the lowest index, since 3 &lt; 4, we don&#8217;t need to update lowest_index.<\/p>\n\n\n\n<p>There is no value left to compare, the algorithm stops here.<\/p>\n\n\n\n<p>At the end of this iteration, the array looks like this:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"231\" height=\"73\" sizes=\"auto, (max-width: 231px) 100vw, 231px\" src=\"https:\/\/datmt.com\/wp-content\/uploads\/2022\/06\/image-5.png\" alt=\"Final iteration\" class=\"wp-image-398\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Selection sort implementation<\/h2>\n\n\n\n<p>Here is the implementation of selection sort algorithm in Java:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-java&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Java&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;java&quot;}\">    private static int[] selection(int[] a) {\n        \/\/start the outer loop at 0\n        for (int i = 0; i &lt; a.length; i++) {\n            \/\/assign the lowest value to the current index\n            int lowest = i;\n\n            for (int k = i + 1; k &lt; a.length; k++) {\n                \/\/if there is a value at k &lt; value at lowest, update lowest to k\n                if (a[k] &lt; a[lowest]) {\n                    lowest = k;\n                }\n            }\n            \/\/check if i != lowest, if so, swap them\n            if (i != lowest) {\n                swap(lowest, i, a);\n            }\n        }\n        return a;\n    }\n<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>As you can see, selection sort is an easy to implement sorting algorithm. Its time complexity is not ideal, though. In the worst case scenario, the time complexity of selection sort is O(n2) since it needs two nested loop to handle the logic.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Selection sort is one of the simple sorting algorithms. Its time complexity is O(n2). Selection sort fundamental Two nested loops Involves swapping At the end of each iteration, the lowest element is at the right position Selection sort steps As mentioned above, there are two loops in this algorithm. Essentially, the steps as below: Let&#8217;s &#8230; <a title=\"Selection sort in Java\" class=\"read-more\" href=\"https:\/\/datmt.com\/fundamental\/selection-sort-in-java\/\" aria-label=\"Read more about Selection sort in Java\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[63],"tags":[66,65,67,64],"class_list":["post-392","post","type-post","status-publish","format-standard","hentry","category-fundamental","tag-algorithms","tag-selection-sort","tag-selection-sort-algorithm","tag-sorting"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Selection sort in Java - datmt<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/datmt.com\/fundamental\/selection-sort-in-java\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Selection sort in Java - datmt\" \/>\n<meta property=\"og:description\" content=\"Selection sort is one of the simple sorting algorithms. Its time complexity is O(n2). Selection sort fundamental Two nested loops Involves swapping At the end of each iteration, the lowest element is at the right position Selection sort steps As mentioned above, there are two loops in this algorithm. Essentially, the steps as below: Let&#8217;s ... Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/datmt.com\/fundamental\/selection-sort-in-java\/\" \/>\n<meta property=\"og:site_name\" content=\"datmt\" \/>\n<meta property=\"article:published_time\" content=\"2022-06-09T02:36:18+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-06-09T02:36:19+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/datmt.com\/wp-content\/uploads\/2022\/06\/image-2.png\" \/>\n<meta name=\"author\" content=\"\u0110\u1ea1t Tr\u1ea7n\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u0110\u1ea1t Tr\u1ea7n\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/datmt.com\/fundamental\/selection-sort-in-java\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/datmt.com\/fundamental\/selection-sort-in-java\/\"},\"author\":{\"name\":\"\u0110\u1ea1t Tr\u1ea7n\",\"@id\":\"https:\/\/datmt.com\/#\/schema\/person\/7736566e3758f424a11fd53f581c4b5e\"},\"headline\":\"Selection sort in Java\",\"datePublished\":\"2022-06-09T02:36:18+00:00\",\"dateModified\":\"2022-06-09T02:36:19+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/datmt.com\/fundamental\/selection-sort-in-java\/\"},\"wordCount\":375,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/datmt.com\/#\/schema\/person\/7736566e3758f424a11fd53f581c4b5e\"},\"image\":{\"@id\":\"https:\/\/datmt.com\/fundamental\/selection-sort-in-java\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/datmt.com\/wp-content\/uploads\/2022\/06\/image-2.png\",\"keywords\":[\"algorithms\",\"selection sort\",\"selection sort algorithm\",\"sorting\"],\"articleSection\":[\"fundamental\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/datmt.com\/fundamental\/selection-sort-in-java\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/datmt.com\/fundamental\/selection-sort-in-java\/\",\"url\":\"https:\/\/datmt.com\/fundamental\/selection-sort-in-java\/\",\"name\":\"Selection sort in Java - datmt\",\"isPartOf\":{\"@id\":\"https:\/\/datmt.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/datmt.com\/fundamental\/selection-sort-in-java\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/datmt.com\/fundamental\/selection-sort-in-java\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/datmt.com\/wp-content\/uploads\/2022\/06\/image-2.png\",\"datePublished\":\"2022-06-09T02:36:18+00:00\",\"dateModified\":\"2022-06-09T02:36:19+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/datmt.com\/fundamental\/selection-sort-in-java\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/datmt.com\/fundamental\/selection-sort-in-java\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/datmt.com\/fundamental\/selection-sort-in-java\/#primaryimage\",\"url\":\"https:\/\/datmt.com\/wp-content\/uploads\/2022\/06\/image-2.png\",\"contentUrl\":\"https:\/\/datmt.com\/wp-content\/uploads\/2022\/06\/image-2.png\",\"width\":656,\"height\":369},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/datmt.com\/fundamental\/selection-sort-in-java\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/datmt.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Selection sort in Java\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/datmt.com\/#website\",\"url\":\"https:\/\/datmt.com\/\",\"name\":\"datmt\",\"description\":\"Hands on projects\",\"publisher\":{\"@id\":\"https:\/\/datmt.com\/#\/schema\/person\/7736566e3758f424a11fd53f581c4b5e\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/datmt.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/datmt.com\/#\/schema\/person\/7736566e3758f424a11fd53f581c4b5e\",\"name\":\"\u0110\u1ea1t Tr\u1ea7n\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/datmt.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/datmt.com\/wp-content\/uploads\/2023\/03\/cropped-profile.jpg\",\"contentUrl\":\"https:\/\/datmt.com\/wp-content\/uploads\/2023\/03\/cropped-profile.jpg\",\"width\":512,\"height\":512,\"caption\":\"\u0110\u1ea1t Tr\u1ea7n\"},\"logo\":{\"@id\":\"https:\/\/datmt.com\/#\/schema\/person\/image\/\"},\"description\":\"I build softwares that solve problems. I also love writing\/documenting things I learn\/want to learn.\",\"sameAs\":[\"https:\/\/datmt.com\"],\"url\":\"https:\/\/datmt.com\/author\/mtdat171_c\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Selection sort in Java - datmt","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/datmt.com\/fundamental\/selection-sort-in-java\/","og_locale":"en_US","og_type":"article","og_title":"Selection sort in Java - datmt","og_description":"Selection sort is one of the simple sorting algorithms. Its time complexity is O(n2). Selection sort fundamental Two nested loops Involves swapping At the end of each iteration, the lowest element is at the right position Selection sort steps As mentioned above, there are two loops in this algorithm. Essentially, the steps as below: Let&#8217;s ... Read more","og_url":"https:\/\/datmt.com\/fundamental\/selection-sort-in-java\/","og_site_name":"datmt","article_published_time":"2022-06-09T02:36:18+00:00","article_modified_time":"2022-06-09T02:36:19+00:00","og_image":[{"url":"https:\/\/datmt.com\/wp-content\/uploads\/2022\/06\/image-2.png","type":"","width":"","height":""}],"author":"\u0110\u1ea1t Tr\u1ea7n","twitter_card":"summary_large_image","twitter_misc":{"Written by":"\u0110\u1ea1t Tr\u1ea7n","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/datmt.com\/fundamental\/selection-sort-in-java\/#article","isPartOf":{"@id":"https:\/\/datmt.com\/fundamental\/selection-sort-in-java\/"},"author":{"name":"\u0110\u1ea1t Tr\u1ea7n","@id":"https:\/\/datmt.com\/#\/schema\/person\/7736566e3758f424a11fd53f581c4b5e"},"headline":"Selection sort in Java","datePublished":"2022-06-09T02:36:18+00:00","dateModified":"2022-06-09T02:36:19+00:00","mainEntityOfPage":{"@id":"https:\/\/datmt.com\/fundamental\/selection-sort-in-java\/"},"wordCount":375,"commentCount":0,"publisher":{"@id":"https:\/\/datmt.com\/#\/schema\/person\/7736566e3758f424a11fd53f581c4b5e"},"image":{"@id":"https:\/\/datmt.com\/fundamental\/selection-sort-in-java\/#primaryimage"},"thumbnailUrl":"https:\/\/datmt.com\/wp-content\/uploads\/2022\/06\/image-2.png","keywords":["algorithms","selection sort","selection sort algorithm","sorting"],"articleSection":["fundamental"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/datmt.com\/fundamental\/selection-sort-in-java\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/datmt.com\/fundamental\/selection-sort-in-java\/","url":"https:\/\/datmt.com\/fundamental\/selection-sort-in-java\/","name":"Selection sort in Java - datmt","isPartOf":{"@id":"https:\/\/datmt.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/datmt.com\/fundamental\/selection-sort-in-java\/#primaryimage"},"image":{"@id":"https:\/\/datmt.com\/fundamental\/selection-sort-in-java\/#primaryimage"},"thumbnailUrl":"https:\/\/datmt.com\/wp-content\/uploads\/2022\/06\/image-2.png","datePublished":"2022-06-09T02:36:18+00:00","dateModified":"2022-06-09T02:36:19+00:00","breadcrumb":{"@id":"https:\/\/datmt.com\/fundamental\/selection-sort-in-java\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/datmt.com\/fundamental\/selection-sort-in-java\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/datmt.com\/fundamental\/selection-sort-in-java\/#primaryimage","url":"https:\/\/datmt.com\/wp-content\/uploads\/2022\/06\/image-2.png","contentUrl":"https:\/\/datmt.com\/wp-content\/uploads\/2022\/06\/image-2.png","width":656,"height":369},{"@type":"BreadcrumbList","@id":"https:\/\/datmt.com\/fundamental\/selection-sort-in-java\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/datmt.com\/"},{"@type":"ListItem","position":2,"name":"Selection sort in Java"}]},{"@type":"WebSite","@id":"https:\/\/datmt.com\/#website","url":"https:\/\/datmt.com\/","name":"datmt","description":"Hands on projects","publisher":{"@id":"https:\/\/datmt.com\/#\/schema\/person\/7736566e3758f424a11fd53f581c4b5e"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/datmt.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/datmt.com\/#\/schema\/person\/7736566e3758f424a11fd53f581c4b5e","name":"\u0110\u1ea1t Tr\u1ea7n","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/datmt.com\/#\/schema\/person\/image\/","url":"https:\/\/datmt.com\/wp-content\/uploads\/2023\/03\/cropped-profile.jpg","contentUrl":"https:\/\/datmt.com\/wp-content\/uploads\/2023\/03\/cropped-profile.jpg","width":512,"height":512,"caption":"\u0110\u1ea1t Tr\u1ea7n"},"logo":{"@id":"https:\/\/datmt.com\/#\/schema\/person\/image\/"},"description":"I build softwares that solve problems. I also love writing\/documenting things I learn\/want to learn.","sameAs":["https:\/\/datmt.com"],"url":"https:\/\/datmt.com\/author\/mtdat171_c\/"}]}},"_links":{"self":[{"href":"https:\/\/datmt.com\/wp-json\/wp\/v2\/posts\/392","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/datmt.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/datmt.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/datmt.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/datmt.com\/wp-json\/wp\/v2\/comments?post=392"}],"version-history":[{"count":1,"href":"https:\/\/datmt.com\/wp-json\/wp\/v2\/posts\/392\/revisions"}],"predecessor-version":[{"id":399,"href":"https:\/\/datmt.com\/wp-json\/wp\/v2\/posts\/392\/revisions\/399"}],"wp:attachment":[{"href":"https:\/\/datmt.com\/wp-json\/wp\/v2\/media?parent=392"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/datmt.com\/wp-json\/wp\/v2\/categories?post=392"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/datmt.com\/wp-json\/wp\/v2\/tags?post=392"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}