{"id":113830,"date":"2026-06-07T14:40:37","date_gmt":"2026-06-07T09:10:37","guid":{"rendered":"https:\/\/www.guvi.in\/blog\/?p=113830"},"modified":"2026-06-07T14:40:38","modified_gmt":"2026-06-07T09:10:38","slug":"selection-sort-in-c-algorithm-program","status":"publish","type":"post","link":"https:\/\/www.guvi.in\/blog\/selection-sort-in-c-algorithm-program\/","title":{"rendered":"Selection Sort in C: Algorithm, Program, and Examples"},"content":{"rendered":"\n<p>Selection Sort is one of the most beginner-friendly sorting algorithms in C programming. It works by repeatedly selecting the smallest element from an unsorted part of an array and placing it in the correct position.<\/p>\n\n\n\n<p>Although it is not the fastest sorting algorithm for large datasets, Selection Sort helps beginners understand sorting logic, array traversal, swapping, and nested loops in C.<\/p>\n\n\n\n<p>In this article, you will learn what is Selection Sort in C, how the algorithm works, its syntax, time complexity, advantages, disadvantages, and how to implement it with a complete C program and examples.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>TL;DR<\/strong><\/h2>\n\n\n\n<ol>\n<li>Selection Sort is a simple comparison-based sorting algorithm used to arrange elements in ascending or descending order.<\/li>\n\n\n\n<li>The algorithm repeatedly finds the minimum element and swaps it with the current position.<\/li>\n\n\n\n<li>It uses nested loops and sorts the array in place without needing extra memory.<\/li>\n\n\n\n<li>Selection Sort has a time complexity of O(n\u00b2), making it less efficient for large datasets.<\/li>\n\n\n\n<li>It is mainly used for learning sorting basics and understanding algorithm logic in C.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>What is Selection Sort in C?<\/strong><\/h2>\n\n\n\n<p>Selection Sort is a sorting algorithm that repeatedly selects the smallest element from the unsorted part of an array and places it at the beginning.<\/p>\n\n\n\n<p>The process continues until all elements are in sorted order.<\/p>\n\n\n\n<p>The algorithm divides the array into two parts:<\/p>\n\n\n\n<ol>\n<li>Sorted portion<\/li>\n\n\n\n<li>Unsorted portion<\/li>\n<\/ol>\n\n\n\n<p>In every iteration, the smallest element from the unsorted section is selected and swapped with the first unsorted element.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Why is Selection Sort Important?<\/strong><\/h2>\n\n\n\n<p>Selection Sort is one of the first <a href=\"https:\/\/www.guvi.in\/blog\/sorting-in-data-structure-categories-types\/\" target=\"_blank\" rel=\"noreferrer noopener\">sorting algorithms<\/a> taught in programming because it helps beginners understand how comparison-based sorting works.<\/p>\n\n\n\n<p>Before learning more complex algorithms like <a href=\"https:\/\/www.guvi.in\/hub\/data-structures-and-algorithms-tutorial\/merge-sort-algorithm\/\" target=\"_blank\" rel=\"noreferrer noopener\">Merge Sort <\/a>or <a href=\"https:\/\/www.guvi.in\/hub\/data-structures-and-algorithms-tutorial\/quick-sort-algorithm\/\" target=\"_blank\" rel=\"noreferrer noopener\">Quick Sort<\/a>, students often start with Selection Sort to build confidence in:<\/p>\n\n\n\n<ol>\n<li>Array traversal<\/li>\n\n\n\n<li>Nested loops<\/li>\n\n\n\n<li>Swapping values<\/li>\n\n\n\n<li>Comparison logic<\/li>\n\n\n\n<li>Algorithm thinking<\/li>\n<\/ol>\n\n\n\n<p>Even though modern applications rarely use Selection Sort for large datasets, understanding its logic creates a strong foundation for learning data structures and algorithms.<\/p>\n\n\n\n<p>Another reason beginners learn Selection Sort is that the algorithm is predictable and easy to dry-run manually.<\/p>\n\n\n\n<p>Unlike some advanced sorting techniques that involve recursion or partitioning logic, Selection Sort follows a direct step-by-step process.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>How Does Selection Sort Work?<\/strong><\/h2>\n\n\n\n<p>Selection Sort works through repeated comparisons.<\/p>\n\n\n\n<p>The algorithm scans the array to find the smallest element and swaps it into the correct position.<\/p>\n\n\n\n<p>The steps are:<\/p>\n\n\n\n<ol>\n<li>Start from the first element.<\/li>\n\n\n\n<li>Find the minimum element in the unsorted part.<\/li>\n\n\n\n<li>Swap it with the current element.<\/li>\n\n\n\n<li>Move to the next position.<\/li>\n\n\n\n<li>Repeat until the array is sorted.<\/li>\n<\/ol>\n\n\n\n<p>Suppose the array is:<\/p>\n\n\n\n<p>64, 25, 12, 22, 11<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Pass 1<\/strong><\/h3>\n\n\n\n<ol>\n<li>Smallest element = 11<\/li>\n\n\n\n<li>Swap with 64<\/li>\n<\/ol>\n\n\n\n<p>11, 25, 12, 22, 64<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Pass 2<\/strong><\/h3>\n\n\n\n<ol>\n<li>Smallest element = 12<\/li>\n\n\n\n<li>Swap with 25<\/li>\n<\/ol>\n\n\n\n<p>11, 12, 25, 22, 64<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Pass 3<\/strong><\/h3>\n\n\n\n<ol>\n<li>Smallest element = 22<\/li>\n\n\n\n<li>Swap with 25<\/li>\n<\/ol>\n\n\n\n<p>11, 12, 22, 25, 64<\/p>\n\n\n\n<p>The array is now sorted.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Selection Sort Algorithm<\/strong><\/h2>\n\n\n\n<p>The basic Selection Sort algorithm is:<\/p>\n\n\n\n<ol>\n<li>Start from index 0<\/li>\n\n\n\n<li>Find the minimum element in the unsorted array<\/li>\n\n\n\n<li>Swap it with the current element<\/li>\n\n\n\n<li>Move to the next index<\/li>\n\n\n\n<li>Repeat until the array is sorted<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>C Program for Selection Sort<\/strong><\/h2>\n\n\n\n<p>Below is the complete <a href=\"https:\/\/www.guvi.in\/hub\/c-tutorial\/what-is-c-language\/\" target=\"_blank\" rel=\"noreferrer noopener\">C program<\/a> for Selection Sort.<\/p>\n\n\n\n<p>include &lt;stdio.h&gt;<\/p>\n\n\n\n<p>int main() {<\/p>\n\n\n\n<p>int arr[] = {64, 25, 12, 22, 11};<\/p>\n\n\n\n<p>int n = 5;<\/p>\n\n\n\n<p>int i, j, minIndex, temp;<\/p>\n\n\n\n<p>for(i = 0; i &lt; n &#8211; 1; i++) {<\/p>\n\n\n\n<p>minIndex = i;<\/p>\n\n\n\n<p>for(j = i + 1; j &lt; n; j++) {<\/p>\n\n\n\n<p>if(arr[j] &lt; arr[minIndex]) {<\/p>\n\n\n\n<p>minIndex = j;<\/p>\n\n\n\n<p>}<\/p>\n\n\n\n<p>}<\/p>\n\n\n\n<p>temp = arr[minIndex];<\/p>\n\n\n\n<p>arr[minIndex] = arr[i];<\/p>\n\n\n\n<p>arr[i] = temp;<\/p>\n\n\n\n<p>}<\/p>\n\n\n\n<p>printf(&#8220;Sorted array:\\n&#8221;);<\/p>\n\n\n\n<p>for(i = 0; i &lt; n; i++) {<\/p>\n\n\n\n<p>printf(&#8220;%d &#8220;, arr[i]);<\/p>\n\n\n\n<p>}<\/p>\n\n\n\n<p>return 0;<\/p>\n\n\n\n<p>}<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Explanation<\/strong><\/h3>\n\n\n\n<p>The outer loop controls the number of passes needed for sorting.<\/p>\n\n\n\n<p>The inner loop searches for the smallest element in the unsorted part of the array.<\/p>\n\n\n\n<p>Once the minimum element is found, swapping is done using a temporary variable.<\/p>\n\n\n\n<p>Finally, the sorted array is displayed using a loop.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Output Example<\/strong><\/h2>\n\n\n\n<p>Sorted array:<\/p>\n\n\n\n<p>11, 12, 22, 25, 64<\/p>\n\n\n\n<p>You can also explore <strong>HCL GUVI\u2019s <\/strong><a href=\"https:\/\/www.guvi.in\/blog\/how-to-learn-dsa-beginner-guide\/?utm_source=blog&amp;utm_medium=hyperlink&amp;utm_campaign=Selection+Sort+in+C%3A+Algorithm%2C+Program%2C+and+Examples\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>DSA ebook<\/strong><\/a> to understand sorting algorithms, arrays, searching techniques, and core programming concepts used in data structures and algorithms.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Dry Run of Selection Sort<\/strong><\/h2>\n\n\n\n<p>Understanding the dry run helps beginners visualize how the algorithm works internally.<\/p>\n\n\n\n<p>Consider the array:<\/p>\n\n\n\n<p>29, 10, 14, 37, 13<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Initial Array<\/strong><\/h3>\n\n\n\n<p>29, 10, 14, 37, 13<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>First Iteration<\/strong><\/h3>\n\n\n\n<ol>\n<li>Smallest element found = 10<\/li>\n\n\n\n<li>Swap 29 and 10<\/li>\n<\/ol>\n\n\n\n<p>Updated array:<\/p>\n\n\n\n<p>10, 29, 14, 37, 13<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Second Iteration<\/strong><\/h3>\n\n\n\n<ol>\n<li>Smallest element in remaining array = 13<\/li>\n\n\n\n<li>Swap 29 and 13<\/li>\n<\/ol>\n\n\n\n<p>Updated array:<\/p>\n\n\n\n<p>10, 13, 14, 37, 29<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Third Iteration<\/strong><\/h3>\n\n\n\n<ol>\n<li>Smallest element already in correct place = 14<\/li>\n<\/ol>\n\n\n\n<p>Updated array:<\/p>\n\n\n\n<p>10, 13, 14, 37, 29<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Fourth Iteration<\/strong><\/h3>\n\n\n\n<ol>\n<li>Smallest element between 37 and 29 = 29<\/li>\n\n\n\n<li>Swap 37 and 29<\/li>\n<\/ol>\n\n\n\n<p>Final sorted array:<\/p>\n\n\n\n<p>10, 13, 14, 29, 37<\/p>\n\n\n\n<p>This repeated process of selecting the minimum value gives Selection Sort its name.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Time Complexity of Selection Sort<\/strong><\/h2>\n\n\n\n<p>Selection Sort performs comparisons repeatedly regardless of the input arrangement.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>Case<\/strong><\/td><td><strong>Time Complexity<\/strong><\/td><\/tr><tr><td>Best Case<\/td><td>O(n\u00b2)<\/td><\/tr><tr><td>Average Case<\/td><td>O(n\u00b2)<\/td><\/tr><tr><td>Worst Case<\/td><td>O(n\u00b2)<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>The <a href=\"https:\/\/www.guvi.in\/hub\/data-structures-and-algorithms-tutorial\/space-complexity-of-algorithms\/\" target=\"_blank\" rel=\"noreferrer noopener\">space complexity<\/a> of Selection Sort is O(1) because it sorts the array in place without using extra memory.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Advantages of Selection Sort<\/strong><\/h2>\n\n\n\n<p>Selection Sort offers several benefits for beginners learning algorithms:<\/p>\n\n\n\n<ol>\n<li>Easy to understand and implement<\/li>\n\n\n\n<li>Requires very little extra memory<\/li>\n\n\n\n<li>Performs fewer swaps compared to Bubble Sort<\/li>\n\n\n\n<li>Useful for small datasets<\/li>\n\n\n\n<li>Helps beginners understand sorting fundamentals clearly<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Disadvantages of Selection Sort<\/strong><\/h2>\n\n\n\n<p>Despite its simplicity, Selection Sort has limitations:<\/p>\n\n\n\n<ol>\n<li>Inefficient for large datasets<\/li>\n\n\n\n<li>Time complexity remains O(n\u00b2)<\/li>\n\n\n\n<li>Slower compared to more advanced sorting algorithms<\/li>\n\n\n\n<li>Not suitable for performance-critical applications<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Selection Sort vs Bubble Sort<\/strong><\/h2>\n\n\n\n<p>Selection Sort and <a href=\"https:\/\/www.guvi.in\/hub\/data-structures-and-algorithms-tutorial\/bubble-sort-algorithm\/#:~:text=Bubble%20Sort%20is%20a%20simple,them%20based%20on%20their%20values.\" target=\"_blank\" rel=\"noreferrer noopener\">Bubble Sort<\/a> are both basic sorting algorithms, but they work differently.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>Feature<\/strong><\/td><td><strong>Selection Sort<\/strong><\/td><td><strong>Bubble Sort<\/strong><\/td><\/tr><tr><td>Main Idea<\/td><td>Select the minimum element<\/td><td>Swap adjacent elements<\/td><\/tr><tr><td>Number of Swaps<\/td><td>Fewer<\/td><td>More<\/td><\/tr><tr><td>Time Complexity<\/td><td>O(n\u00b2)<\/td><td>O(n\u00b2)<\/td><\/tr><tr><td>Efficiency<\/td><td>Slightly better<\/td><td>Slightly slower<\/td><\/tr><tr><td>Beginner Friendly<\/td><td>Yes<\/td><td>Yes<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Ascending vs Descending Order in Selection Sort<\/strong><\/h2>\n\n\n\n<p>Selection Sort can arrange elements in both ascending and descending order.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Ascending Order<\/strong><\/h3>\n\n\n\n<p>In ascending order sorting, the algorithm selects the minimum element during each pass.<\/p>\n\n\n\n<p>Example:<\/p>\n\n\n\n<p>11, 12, 22, 25, 64<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Descending Order<\/strong><\/h3>\n\n\n\n<p>In descending order sorting, the algorithm selects the maximum element during each pass.<\/p>\n\n\n\n<p>Example:<\/p>\n\n\n\n<p>64, 25, 22, 12, 11<\/p>\n\n\n\n<p>The sorting condition can be easily modified based on the required order.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Applications of Selection Sort<\/strong><\/h2>\n\n\n\n<p>Selection Sort is mainly used in educational and small-scale scenarios.<\/p>\n\n\n\n<p>Some common applications include:<\/p>\n\n\n\n<ol>\n<li>Teaching sorting concepts to beginners<\/li>\n\n\n\n<li>Small datasets with limited memory<\/li>\n\n\n\n<li>Systems where swap operations are costly<\/li>\n\n\n\n<li>Understanding algorithm optimization basics<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Why Selection Sort is Not Used for Large Applications<\/strong><\/h2>\n\n\n\n<p>Selection Sort becomes inefficient when the dataset size increases.<\/p>\n\n\n\n<p>For example, if an array contains thousands or millions of elements, the algorithm performs a very large number of comparisons.<\/p>\n\n\n\n<p>Modern applications usually prefer faster sorting algorithms, such as:<\/p>\n\n\n\n<ol>\n<li>Merge Sort<\/li>\n\n\n\n<li>Quick Sort<\/li>\n\n\n\n<li><a href=\"https:\/\/guvi.in\/hub\/data-structures-and-algorithms-tutorial\/heap-sort-algorithm\/\" target=\"_blank\" data-type=\"link\" data-id=\"https:\/\/guvi.in\/hub\/data-structures-and-algorithms-tutorial\/heap-sort-algorithm\/\" rel=\"noreferrer noopener\">Heap Sort<\/a><\/li>\n\n\n\n<li>Tim Sort<\/li>\n<\/ol>\n\n\n\n<p>These algorithms perform significantly better for large-scale systems, databases, search engines, and real-time applications.<\/p>\n\n\n\n<p>However, Selection Sort remains valuable for learning core algorithm concepts.<\/p>\n\n\n\n<div style=\"background-color: #099f4e; border: 3px solid #110053; border-radius: 12px; padding: 18px 22px; color: #FFFFFF; font-size: 18px; font-family: Montserrat, Helvetica, sans-serif; line-height: 1.6; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); max-width: 750px;\">\n  <strong style=\"font-size: 22px; color: #FFFFFF;\">\ud83d\udca1 Did You Know?<\/strong>\n  <p style=\"margin-top: 14px; margin-bottom: 0;\">\n    <strong style=\"color: #FFFFFF;\">Selection Sort<\/strong> performs the same number of comparisons regardless of whether the input array is completely unsorted or already sorted. This is because it repeatedly scans the remaining unsorted portion of the array to find the minimum element, resulting in a consistent <strong style=\"color: #FFFFFF;\">O(n\u00b2)<\/strong> comparison count. However, unlike <strong style=\"color: #FFFFFF;\">Bubble Sort<\/strong>, Selection Sort minimizes data movement by performing at most one swap per pass. This characteristic can make it useful in environments where <strong style=\"color: #FFFFFF;\">memory write operations are costly<\/strong> or limited. Although rarely used in production systems, Selection Sort introduces foundational concepts such as comparison-based ordering and element positioning, which help learners understand more advanced sorting algorithms and optimization techniques.\n  <\/p>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Common Mistakes Beginners Make<\/strong><\/h2>\n\n\n\n<p>While implementing Selection Sort in C, beginners often make these mistakes:<\/p>\n\n\n\n<ol>\n<li>Incorrect Loop Range: Using the wrong loop condition may cause array index errors.<\/li>\n\n\n\n<li>Forgetting to Update minIndex: If the minimum index is not updated properly, sorting fails.<\/li>\n\n\n\n<li>Swapping Inside the Inner Loop: Swapping should happen only after finding the minimum element.<\/li>\n\n\n\n<li>Using Wrong Array Size: Incorrect array length can cause unexpected output.<\/li>\n<\/ol>\n\n\n\n<p>Practicing dry runs step-by-step can help avoid these errors.<\/p>\n\n\n\n<p>Curious about how these concepts work in real-world applications? Join <strong>HCL GUVI\u2019s<\/strong> <a href=\"https:\/\/www.guvi.in\/courses\/web-development\/c-programming\/?utm_source=blog&amp;utm_medium=hyperlink&amp;utm_campaign=Selection+Sort+in+C%3A+Algorithm%2C+Program%2C+and+Examples\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>C Programming course<\/strong><\/a> to build projects and learn programming concepts used in backend and web development.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Conclusion<\/strong><\/h2>\n\n\n\n<p>Selection Sort in C is one of the easiest sorting algorithms for beginners to grasp.<\/p>\n\n\n\n<p>It introduces important programming concepts such as nested loops, array traversal, comparisons, and swapping.<\/p>\n\n\n\n<p>Although it is not suitable for large-scale applications due to its O(n\u00b2) time complexity, it is still a valuable algorithm for learning the basics of sorting and problem-solving in C programming.<\/p>\n\n\n\n<p>By practicing Selection Sort programs and dry-running examples, beginners can build a stronger foundation before moving on to advanced sorting algorithms like Merge Sort and Quick Sort.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>FAQs<\/strong><\/h2>\n\n\n<div id=\"rank-math-faq\" class=\"rank-math-block\">\n<div class=\"rank-math-list \">\n<div id=\"faq-question-1780375604370\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \"><strong>1. What is Selection Sort in C?<\/strong><\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Selection Sort is a simple sorting algorithm that repeatedly selects the minimum element from an unsorted array and places it in the correct position.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1780375609912\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \"><strong>2. What is the time complexity of Selection Sort?<\/strong><\/h3>\n<div class=\"rank-math-answer \">\n\n<p>The best, average, and worst-case time complexity of Selection Sort is O(n\u00b2).<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1780375619515\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \"><strong>3. Is Selection Sort stable?<\/strong><\/h3>\n<div class=\"rank-math-answer \">\n\n<p>No, Selection Sort is generally considered an unstable sorting algorithm because equal elements may change their relative positions.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1780375628206\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \"><strong>4. Why is Selection Sort important for beginners?<\/strong><\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Selection Sort helps beginners understand sorting logic, nested loops, comparisons, and swapping techniques in programming.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1780375639428\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \"><strong>5. Which is better: Selection Sort or Bubble Sort?<\/strong><\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Selection Sort usually performs fewer swaps than Bubble Sort, making it slightly more efficient in some cases.<\/p>\n\n<\/div>\n<\/div>\n<\/div>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>Selection Sort is one of the most beginner-friendly sorting algorithms in C programming. It works by repeatedly selecting the smallest element from an unsorted part of an array and placing it in the correct position. Although it is not the fastest sorting algorithm for large datasets, Selection Sort helps beginners understand sorting logic, array traversal, [&hellip;]<\/p>\n","protected":false},"author":63,"featured_media":115149,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[37],"tags":[],"views":"45","authorinfo":{"name":"Vishalini Devarajan","url":"https:\/\/www.guvi.in\/blog\/author\/vishalini\/"},"thumbnailURL":"https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/06\/selection-sort-in-c-algorithm-program-300x115.webp","_links":{"self":[{"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/posts\/113830"}],"collection":[{"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/users\/63"}],"replies":[{"embeddable":true,"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/comments?post=113830"}],"version-history":[{"count":4,"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/posts\/113830\/revisions"}],"predecessor-version":[{"id":115148,"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/posts\/113830\/revisions\/115148"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/media\/115149"}],"wp:attachment":[{"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/media?parent=113830"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/categories?post=113830"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/tags?post=113830"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}