{"id":49179,"date":"2025-05-16T12:09:57","date_gmt":"2025-05-16T06:39:57","guid":{"rendered":"https:\/\/www.iquanta.in\/blog\/?p=49179"},"modified":"2025-05-16T12:09:59","modified_gmt":"2025-05-16T06:39:59","slug":"counting-sort-algorithm-working-advantages-and-applications","status":"publish","type":"post","link":"https:\/\/www.iquanta.in\/blog\/counting-sort-algorithm-working-advantages-and-applications\/","title":{"rendered":"Counting Sort Algorithm : Working, Advantages and Applications"},"content":{"rendered":"\n<p>In the world of computer science and data structures we have came across multiple sorting algorithms and techniques like Bubble Sort, Merge Sort, Quick Sort. These all algorithms are comparison based algorithms. If you want to cover the basics of algorithms like <a href=\"https:\/\/www.iquanta.in\/blog\/bubble-sort-algorithm-with-complexity-analysis\/\">bubble sort<\/a>, <a href=\"https:\/\/www.iquanta.in\/blog\/quicksort-algorithm-working-time-complexity-advanta\">quick sort<\/a>, <a href=\"https:\/\/www.iquanta.in\/blog\/merge-sort-algorithm-with-complexity-analysis-working\/\">merge sort<\/a>, <a href=\"https:\/\/www.iquanta.in\/blog\/insertion-sort-algorithm-with-complexity-analysis\/\">insertion sort<\/a> and selection sort then we have already covered such algorithms in our series.<\/p>\n\n\n\n<p>In today&#8217;s blog we will be covering one very special non-comparison based algorithm that is counting sort algorithm. We will explore how counting sort works, advantages, disadvantages and applications.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_77 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.iquanta.in\/blog\/counting-sort-algorithm-working-advantages-and-applications\/#What_is_a_Counting_Sort_Algorithm\" >What is a Counting Sort Algorithm?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.iquanta.in\/blog\/counting-sort-algorithm-working-advantages-and-applications\/#Working_of_Counting_Sort_Algorithm\" >Working of Counting Sort Algorithm<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.iquanta.in\/blog\/counting-sort-algorithm-working-advantages-and-applications\/#Finding_Maximum_Element_Step_1\" >Finding Maximum Element (Step 1)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.iquanta.in\/blog\/counting-sort-algorithm-working-advantages-and-applications\/#Initialize_the_Count_Array\" >Initialize the Count Array<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.iquanta.in\/blog\/counting-sort-algorithm-working-advantages-and-applications\/#Count_the_Occurrences_of_Elements\" >Count the Occurrences of Elements<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.iquanta.in\/blog\/counting-sort-algorithm-working-advantages-and-applications\/#Final_Count_Array\" >Final Count Array<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.iquanta.in\/blog\/counting-sort-algorithm-working-advantages-and-applications\/#Build_the_Output_Array\" >Build the Output Array<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.iquanta.in\/blog\/counting-sort-algorithm-working-advantages-and-applications\/#Complexity_Analysis_of_Counting_Sort_Algorithm\" >Complexity Analysis of Counting Sort Algorithm<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.iquanta.in\/blog\/counting-sort-algorithm-working-advantages-and-applications\/#Implementation_of_Counting_Sort\" >Implementation of Counting Sort<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.iquanta.in\/blog\/counting-sort-algorithm-working-advantages-and-applications\/#Advantages_of_Counting_Sort\" >Advantages of Counting Sort<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/www.iquanta.in\/blog\/counting-sort-algorithm-working-advantages-and-applications\/#Disadvantages_of_Counting_Sort\" >Disadvantages of Counting Sort<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/www.iquanta.in\/blog\/counting-sort-algorithm-working-advantages-and-applications\/#Applications_of_Counting_Sort_Algorithm\" >Applications of Counting Sort Algorithm<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/www.iquanta.in\/blog\/counting-sort-algorithm-working-advantages-and-applications\/#FAQs_Counting_Sort_Algo\" >FAQs (Counting Sort Algo)<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/www.iquanta.in\/blog\/counting-sort-algorithm-working-advantages-and-applications\/#What_type_of_data_is_best_suited_for_Counting_Sort\" >What type of data is best suited for Counting Sort?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/www.iquanta.in\/blog\/counting-sort-algorithm-working-advantages-and-applications\/#Is_Counting_Sort_a_comparison-based_sorting_algorithm\" >Is Counting Sort a comparison-based sorting algorithm?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/www.iquanta.in\/blog\/counting-sort-algorithm-working-advantages-and-applications\/#Can_Counting_Sort_handle_negative_numbers\" >Can Counting Sort handle negative numbers?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/www.iquanta.in\/blog\/counting-sort-algorithm-working-advantages-and-applications\/#Is_Counting_Sort_a_stable_sorting_algorithm\" >Is Counting Sort a stable sorting algorithm?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-18\" href=\"https:\/\/www.iquanta.in\/blog\/counting-sort-algorithm-working-advantages-and-applications\/#What_is_the_time_complexity_of_Counting_Sort\" >What is the time complexity of Counting Sort?<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\" id=\"h-what-is-a-counting-sort-algorithm\"><span class=\"ez-toc-section\" id=\"What_is_a_Counting_Sort_Algorithm\"><\/span><strong>What is a Counting Sort Algorithm?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Counting Sort Algorithm is a non-comparison based algorithm like radix sort, bucket sort whereas bubble sort, merge sort, selection sort, insertion sort and quick sort all are comparison-based algorithm. <\/p>\n\n\n\n<p>When we talk about counting sort then in this we have already range defined or either we can continue with the process by finding the maximum element from the given input array. Let&#8217;s look at an example where we have an array [3, 1, 3, 3, 2, 1, 2]<\/p>\n\n\n\n<p>In this array we have maximum array is 3 and with the help of that we have to define the additional space to solve a particular sorting problem. To check the working of a counting sort algorithm we will have a look of different steps of doing that in the next section. <\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><a href=\"https:\/\/chat.whatsapp.com\/B6weknl7133BQXjPva0pgB\"><img fetchpriority=\"high\" decoding=\"async\" width=\"875\" height=\"142\" src=\"https:\/\/www.iquanta.in\/blog\/wp-content\/uploads\/2025\/05\/image-55.png\" alt=\"Counting Sort\n\" class=\"wp-image-49047\" srcset=\"https:\/\/www.iquanta.in\/blog\/wp-content\/uploads\/2025\/05\/image-55.png 875w, https:\/\/www.iquanta.in\/blog\/wp-content\/uploads\/2025\/05\/image-55-300x49.png 300w, https:\/\/www.iquanta.in\/blog\/wp-content\/uploads\/2025\/05\/image-55-768x125.png 768w, https:\/\/www.iquanta.in\/blog\/wp-content\/uploads\/2025\/05\/image-55-150x24.png 150w, https:\/\/www.iquanta.in\/blog\/wp-content\/uploads\/2025\/05\/image-55-696x113.png 696w\" sizes=\"(max-width: 875px) 100vw, 875px\" \/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-working-of-counting-sort-algorithm\"><span class=\"ez-toc-section\" id=\"Working_of_Counting_Sort_Algorithm\"><\/span><strong>Working of Counting Sort Algorithm<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>In this section we are covering the working of counting sort algorithm step by step. Let&#8217;s begin by initialize array of input size [3, 1, 3, 3, 2, 1, 2]. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-finding-maximum-element-step-1\"><span class=\"ez-toc-section\" id=\"Finding_Maximum_Element_Step_1\"><\/span><strong>Finding Maximum Element (Step 1)<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>To determine the size of the count array, we need to find the maximum element from the given input array. In our example 3 is the maximum element of the array. <\/p>\n\n\n\n<p>So in this case we need a count array of size max + 1 i.e, 3 +1 = 4.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-initialize-the-count-array\"><span class=\"ez-toc-section\" id=\"Initialize_the_Count_Array\"><\/span><strong>Initialize the Count Array<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Now we have to create a count array of size 4 and initialize all the values by 0. <\/p>\n\n\n\n<p>Count Array : [0, 0, 0, 0]<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" width=\"425\" height=\"281\" src=\"https:\/\/www.iquanta.in\/blog\/wp-content\/uploads\/2025\/05\/image-66.png\" alt=\"Counting Sort Algorithm\" class=\"wp-image-49221\" style=\"width:523px;height:auto\" srcset=\"https:\/\/www.iquanta.in\/blog\/wp-content\/uploads\/2025\/05\/image-66.png 425w, https:\/\/www.iquanta.in\/blog\/wp-content\/uploads\/2025\/05\/image-66-300x198.png 300w, https:\/\/www.iquanta.in\/blog\/wp-content\/uploads\/2025\/05\/image-66-150x99.png 150w\" sizes=\"(max-width: 425px) 100vw, 425px\" \/><\/figure><\/div>\n\n\n<h3 class=\"wp-block-heading\" id=\"h-count-the-occurrences-of-elements\"><span class=\"ez-toc-section\" id=\"Count_the_Occurrences_of_Elements\"><\/span><strong>Count the Occurrences of Elements<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><a href=\"https:\/\/chat.whatsapp.com\/B6weknl7133BQXjPva0pgB\"><img fetchpriority=\"high\" decoding=\"async\" width=\"875\" height=\"142\" src=\"https:\/\/www.iquanta.in\/blog\/wp-content\/uploads\/2025\/05\/image-55.png\" alt=\"Counting Sort\n\" class=\"wp-image-49047\" srcset=\"https:\/\/www.iquanta.in\/blog\/wp-content\/uploads\/2025\/05\/image-55.png 875w, https:\/\/www.iquanta.in\/blog\/wp-content\/uploads\/2025\/05\/image-55-300x49.png 300w, https:\/\/www.iquanta.in\/blog\/wp-content\/uploads\/2025\/05\/image-55-768x125.png 768w, https:\/\/www.iquanta.in\/blog\/wp-content\/uploads\/2025\/05\/image-55-150x24.png 150w, https:\/\/www.iquanta.in\/blog\/wp-content\/uploads\/2025\/05\/image-55-696x113.png 696w\" sizes=\"(max-width: 875px) 100vw, 875px\" \/><\/a><\/figure>\n\n\n\n<p>Go through the input array and count the number of occurrences of each value:<\/p>\n\n\n\n<ol>\n<li>For 3: count[3] += 1 &#8212; count = [0, 0, 0, 1]<\/li>\n\n\n\n<li>For 1: count[1] += 1 &#8212; count = [0, 1, 0, 1]<\/li>\n\n\n\n<li>For 3: count[3] += 1 &#8212; count = [0, 1, 0, 2]<\/li>\n\n\n\n<li>For 3: count[3] += 1 &#8212; count = [0, 1, 0, 3]<\/li>\n\n\n\n<li>For 2: count[2] += 1 &#8212; count = [0, 1, 1, 3]<\/li>\n\n\n\n<li>For 1: count[1] += 1 &#8212; count = [0, 2, 1, 3]<\/li>\n\n\n\n<li>For 2: count[2] += 1 &#8212; count = [0, 2, 2, 3]<\/li>\n<\/ol>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" width=\"410\" height=\"242\" src=\"https:\/\/www.iquanta.in\/blog\/wp-content\/uploads\/2025\/05\/image-67.png\" alt=\"Counting Sort 2nd image\" class=\"wp-image-49222\" style=\"width:552px;height:auto\" srcset=\"https:\/\/www.iquanta.in\/blog\/wp-content\/uploads\/2025\/05\/image-67.png 410w, https:\/\/www.iquanta.in\/blog\/wp-content\/uploads\/2025\/05\/image-67-300x177.png 300w, https:\/\/www.iquanta.in\/blog\/wp-content\/uploads\/2025\/05\/image-67-150x89.png 150w\" sizes=\"(max-width: 410px) 100vw, 410px\" \/><\/figure><\/div>\n\n\n<h3 class=\"wp-block-heading\" id=\"h-final-count-array\"><span class=\"ez-toc-section\" id=\"Final_Count_Array\"><\/span><strong>Final Count Array<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Lastly we got our count and the final count array is [0, 2, 2, 3]<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Build_the_Output_Array\"><\/span><strong>Build the Output Array<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Create an output array of the same size as input: output = [0, 0, 0, 0, 0, 0, 0]<\/p>\n\n\n\n<p>Now place each element from the input array into its sorted position using the count array (iterate in reverse for stability).<\/p>\n\n\n\n<p>Final Array : [1, 1, 2, 2, 3, 3, 3]<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"591\" height=\"361\" src=\"https:\/\/www.iquanta.in\/blog\/wp-content\/uploads\/2025\/05\/image-68.png\" alt=\"Counting Sort 3rd image\" class=\"wp-image-49223\" srcset=\"https:\/\/www.iquanta.in\/blog\/wp-content\/uploads\/2025\/05\/image-68.png 591w, https:\/\/www.iquanta.in\/blog\/wp-content\/uploads\/2025\/05\/image-68-300x183.png 300w, https:\/\/www.iquanta.in\/blog\/wp-content\/uploads\/2025\/05\/image-68-150x92.png 150w\" sizes=\"(max-width: 591px) 100vw, 591px\" \/><\/figure><\/div>\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td class=\"has-text-align-center\" data-align=\"center\"><strong>Step<\/strong><\/td><td class=\"has-text-align-center\" data-align=\"center\"><strong>Description<\/strong><\/td><td class=\"has-text-align-center\" data-align=\"center\"><strong>Count Array<\/strong><\/td><td class=\"has-text-align-center\" data-align=\"center\"><strong>Output Array<\/strong><\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">Initial<\/td><td class=\"has-text-align-center\" data-align=\"center\">Input array<\/td><td class=\"has-text-align-center\" data-align=\"center\">[0, 0, 0, 0]<\/td><td class=\"has-text-align-center\" data-align=\"center\">[_, _, _, _, _, _, _]<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">Count occurrences<\/td><td class=\"has-text-align-center\" data-align=\"center\">Count of each number<\/td><td class=\"has-text-align-center\" data-align=\"center\">[0, 2, 2, 3]<\/td><td class=\"has-text-align-center\" data-align=\"center\">[_, _, _, _, _, _, _]<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">Cumulative count<\/td><td class=\"has-text-align-center\" data-align=\"center\">Prefix sum of count array<\/td><td class=\"has-text-align-center\" data-align=\"center\">[0, 2, 4, 7]<\/td><td class=\"has-text-align-center\" data-align=\"center\">[_, _, _, _, _, _, _]<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">Place 2 (from index 6)<\/td><td class=\"has-text-align-center\" data-align=\"center\">count[2] = 4 &#8212; place at index 3, count[2] -= 1<\/td><td class=\"has-text-align-center\" data-align=\"center\">[0, 2, 3, 7]<\/td><td class=\"has-text-align-center\" data-align=\"center\">[_, _, _, 2, _, _, _]<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">Place 1 (from index 5)<\/td><td class=\"has-text-align-center\" data-align=\"center\">count[1] = 2 &#8212; place at index 1, count[1] -= 1<\/td><td class=\"has-text-align-center\" data-align=\"center\">[0, 1, 3, 7]<\/td><td class=\"has-text-align-center\" data-align=\"center\">[_, 1, _, 2, _, _, _]<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">Place 2 (from index 4)<\/td><td class=\"has-text-align-center\" data-align=\"center\">count[2] = 3 &#8212; place at index 2, count[2] -= 1<\/td><td class=\"has-text-align-center\" data-align=\"center\">[0, 1, 2, 7]<\/td><td class=\"has-text-align-center\" data-align=\"center\">[_, 1, 2, 2, _, _, _]<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">Place 3 (from index 3)<\/td><td class=\"has-text-align-center\" data-align=\"center\">count[3] = 7 &#8212; place at index 6, count[3] -= 1<\/td><td class=\"has-text-align-center\" data-align=\"center\">[0, 1, 2, 6]<\/td><td class=\"has-text-align-center\" data-align=\"center\">[_, 1, 2, 2, _, _, 3]<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">Place 3 (from index 2)<\/td><td class=\"has-text-align-center\" data-align=\"center\">count[3] = 6 &#8212; place at index 5, count[3] -= 1<\/td><td class=\"has-text-align-center\" data-align=\"center\">[0, 1, 2, 5]<\/td><td class=\"has-text-align-center\" data-align=\"center\">[_, 1, 2, 2, _, 3, 3]<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">Place 1 (from index 1)<\/td><td class=\"has-text-align-center\" data-align=\"center\">count[1] = 1 &#8212; place at index 0, count[1] -= 1<\/td><td class=\"has-text-align-center\" data-align=\"center\">[0, 0, 2, 5]<\/td><td class=\"has-text-align-center\" data-align=\"center\">[1, 1, 2, 2, _, 3, 3]<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">Place 3 (from index 0)<\/td><td class=\"has-text-align-center\" data-align=\"center\">count[3] = 5 &#8212; place at index 4, count[3] -= 1<\/td><td class=\"has-text-align-center\" data-align=\"center\">[0, 0, 2, 4]<\/td><td class=\"has-text-align-center\" data-align=\"center\">[1, 1, 2, 2, 3, 3, 3]<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\"><\/td><td class=\"has-text-align-center\" data-align=\"center\"><\/td><td class=\"has-text-align-center\" data-align=\"center\"><\/td><td class=\"has-text-align-center\" data-align=\"center\"><\/td><\/tr><\/tbody><\/table><figcaption class=\"wp-element-caption\">Explanation of Above Example <\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><a href=\"https:\/\/chat.whatsapp.com\/B6weknl7133BQXjPva0pgB\"><img fetchpriority=\"high\" decoding=\"async\" width=\"875\" height=\"142\" src=\"https:\/\/www.iquanta.in\/blog\/wp-content\/uploads\/2025\/05\/image-55.png\" alt=\"Counting Sort\n\" class=\"wp-image-49047\" srcset=\"https:\/\/www.iquanta.in\/blog\/wp-content\/uploads\/2025\/05\/image-55.png 875w, https:\/\/www.iquanta.in\/blog\/wp-content\/uploads\/2025\/05\/image-55-300x49.png 300w, https:\/\/www.iquanta.in\/blog\/wp-content\/uploads\/2025\/05\/image-55-768x125.png 768w, https:\/\/www.iquanta.in\/blog\/wp-content\/uploads\/2025\/05\/image-55-150x24.png 150w, https:\/\/www.iquanta.in\/blog\/wp-content\/uploads\/2025\/05\/image-55-696x113.png 696w\" sizes=\"(max-width: 875px) 100vw, 875px\" \/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-complexity-analysis-of-counting-sort-algorithm\"><span class=\"ez-toc-section\" id=\"Complexity_Analysis_of_Counting_Sort_Algorithm\"><\/span><strong>Complexity Analysis of Counting Sort Algorithm<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Complexity for the counting sort algorithm depends upon the input array and the additional space array that is counting array. I am initializing these terms with variable &#8216;n&#8217; (input size) and &#8216;k&#8217;. <\/p>\n\n\n\n<p>In the Best Case complexity analysis we got O(n+k), for average case complexity it is O(n+k) and for the worst case complexity it is O(n+k). The Space Complexity for the count sort algorithm is O(n+k) that depend upon the input size array and the count array.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>Cases<\/td><td>Time Complexities <\/td><\/tr><tr><td>Best Case Time Complexity<\/td><td>O(n+k)<\/td><\/tr><tr><td>Average Case Time Complexity<\/td><td>O(n+k)<\/td><\/tr><tr><td>Worst Case Time Complexity<\/td><td>O(n+k)<\/td><\/tr><\/tbody><\/table><figcaption class=\"wp-element-caption\">Complexity Analysis of Counting Sort Algorithm<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-implementation-of-counting-sort\"><span class=\"ez-toc-section\" id=\"Implementation_of_Counting_Sort\"><\/span><strong>Implementation of Counting Sort<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>In this section we are seeing the coding implementation of  Counting Sort Algorithm in python programming language.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>def counting_sort(arr):\n    if not arr:\n        return arr\n    max_val = max(arr)\n    min_val = min(arr)\n    range_of_elements = max_val - min_val + 1\n    count = &#091;0] * range_of_elements\n    output = &#091;0] * len(arr)\n    for num in arr:\n        count&#091;num - min_val] += 1\n    for i in range(1, len(count)):\n        count&#091;i] += count&#091;i - 1]\n    for num in reversed(arr):\n        output&#091;count&#091;num - min_val] - 1] = num\n        count&#091;num - min_val] -= 1\n    return output\n\nOutput for the following code <\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-advantages-of-counting-sort\"><span class=\"ez-toc-section\" id=\"Advantages_of_Counting_Sort\"><\/span><strong>Advantages of Counting Sort<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>There are some advantages of counting sort algorithm over other sorting algorithms.<\/p>\n\n\n\n<ol>\n<li>It has linear time complexity when the range of input is not much larger than the number of elements.<\/li>\n\n\n\n<li>It is a stable sorting algorithm that keeps equal elements in their original order.<\/li>\n\n\n\n<li>It does not use any comparison between elements during sorting.<\/li>\n\n\n\n<li>It is easy to understand and implement with basic programming knowledge.<\/li>\n\n\n\n<li>It works well for sorting large datasets with a small range of values.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><a href=\"https:\/\/chat.whatsapp.com\/B6weknl7133BQXjPva0pgB\"><img fetchpriority=\"high\" decoding=\"async\" width=\"875\" height=\"142\" src=\"https:\/\/www.iquanta.in\/blog\/wp-content\/uploads\/2025\/05\/image-55.png\" alt=\"Counting Sort\n\" class=\"wp-image-49047\" srcset=\"https:\/\/www.iquanta.in\/blog\/wp-content\/uploads\/2025\/05\/image-55.png 875w, https:\/\/www.iquanta.in\/blog\/wp-content\/uploads\/2025\/05\/image-55-300x49.png 300w, https:\/\/www.iquanta.in\/blog\/wp-content\/uploads\/2025\/05\/image-55-768x125.png 768w, https:\/\/www.iquanta.in\/blog\/wp-content\/uploads\/2025\/05\/image-55-150x24.png 150w, https:\/\/www.iquanta.in\/blog\/wp-content\/uploads\/2025\/05\/image-55-696x113.png 696w\" sizes=\"(max-width: 875px) 100vw, 875px\" \/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-disadvantages-of-counting-sort\"><span class=\"ez-toc-section\" id=\"Disadvantages_of_Counting_Sort\"><\/span><strong>Disadvantages of Counting Sort<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>There are some disadvantages of counting sort algorithm over other sorting algorithms.<\/p>\n\n\n\n<ol>\n<li>It is not efficient when the range of input values is very large compared to the number of elements.<\/li>\n\n\n\n<li>It uses extra space to store the count and output arrays, which increases memory usage.<\/li>\n\n\n\n<li>It only works for non-negative integers or needs modifications for negative numbers.<\/li>\n\n\n\n<li>It is not suitable for sorting data with floating-point numbers or strings directly.<\/li>\n\n\n\n<li>It becomes less practical when dealing with very large numbers or a wide range of input values.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-applications-of-counting-sort-algorithm\"><span class=\"ez-toc-section\" id=\"Applications_of_Counting_Sort_Algorithm\"><\/span><strong>Applications of Counting Sort Algorithm <\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ol>\n<li>It is used in situations where the input data is limited to a small range of integers.<\/li>\n\n\n\n<li>It is helpful in sorting characters or strings based on alphabetical order using ASCII values.<\/li>\n\n\n\n<li>It is used in digital image processing where pixel values fall within a known range.<\/li>\n\n\n\n<li>It can be applied in making histograms or frequency counts of elements quickly.<\/li>\n\n\n\n<li>It is useful in scenarios that need stable and fast sorting for small-range numeric data.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><a href=\"https:\/\/chat.whatsapp.com\/B6weknl7133BQXjPva0pgB\"><img fetchpriority=\"high\" decoding=\"async\" width=\"875\" height=\"142\" src=\"https:\/\/www.iquanta.in\/blog\/wp-content\/uploads\/2025\/05\/image-55.png\" alt=\"Counting Sort\n\" class=\"wp-image-49047\" srcset=\"https:\/\/www.iquanta.in\/blog\/wp-content\/uploads\/2025\/05\/image-55.png 875w, https:\/\/www.iquanta.in\/blog\/wp-content\/uploads\/2025\/05\/image-55-300x49.png 300w, https:\/\/www.iquanta.in\/blog\/wp-content\/uploads\/2025\/05\/image-55-768x125.png 768w, https:\/\/www.iquanta.in\/blog\/wp-content\/uploads\/2025\/05\/image-55-150x24.png 150w, https:\/\/www.iquanta.in\/blog\/wp-content\/uploads\/2025\/05\/image-55-696x113.png 696w\" sizes=\"(max-width: 875px) 100vw, 875px\" \/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-faqs-counting-sort-algo\"><span class=\"ez-toc-section\" id=\"FAQs_Counting_Sort_Algo\"><\/span><strong>FAQs (Counting Sort Algo)<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-what-type-of-data-is-best-suited-for-counting-sort\"><span class=\"ez-toc-section\" id=\"What_type_of_data_is_best_suited_for_Counting_Sort\"><\/span><strong>What type of data is best suited for Counting Sort?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Counting Sort works best for sorting integers within a small, known range.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-is-counting-sort-a-comparison-based-sorting-algorithm\"><span class=\"ez-toc-section\" id=\"Is_Counting_Sort_a_comparison-based_sorting_algorithm\"><\/span><strong>Is Counting Sort a comparison-based sorting algorithm?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>No counting sort is not a comparison based algorithm.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-can-counting-sort-handle-negative-numbers\"><span class=\"ez-toc-section\" id=\"Can_Counting_Sort_handle_negative_numbers\"><\/span><strong><strong>Can Counting Sort handle negative numbers?<\/strong><\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>By default answer is no but it can be modified to handle negative numbers by shifting values.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-is-counting-sort-a-stable-sorting-algorithm\"><span class=\"ez-toc-section\" id=\"Is_Counting_Sort_a_stable_sorting_algorithm\"><\/span><strong>Is Counting Sort a stable sorting algorithm?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Yes, Counting Sort maintains the relative order of equal elements.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-what-is-the-time-complexity-of-counting-sort\"><span class=\"ez-toc-section\" id=\"What_is_the_time_complexity_of_Counting_Sort\"><\/span><strong>What is the time complexity of Counting Sort?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Its time complexity is O(n + k), where n is the number of elements and k is the range of input values.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the world of computer science and data structures we have came across multiple sorting algorithms and techniques like Bubble Sort, Merge Sort, Quick Sort. These all algorithms are comparison based algorithms. If you want to cover the basics of algorithms like bubble sort, quick sort, merge sort, insertion sort and selection sort then we [&hellip;]<\/p>\n","protected":false},"author":560,"featured_media":49232,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1075,1073],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.4 (Yoast SEO v21.9.1) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Counting Sort Algorithm : Working, Advantages and Applications - iQuanta<\/title>\n<meta name=\"description\" content=\"Discover non comparison based counting sort algorithm along with its working, time complexity, advantages and disadvantages.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.iquanta.in\/blog\/counting-sort-algorithm-working-advantages-and-applications\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Counting Sort Algorithm : Working, Advantages and Applications\" \/>\n<meta property=\"og:description\" content=\"Discover non comparison based counting sort algorithm along with its working, time complexity, advantages and disadvantages.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.iquanta.in\/blog\/counting-sort-algorithm-working-advantages-and-applications\/\" \/>\n<meta property=\"og:site_name\" content=\"iQuanta\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/facebook.com\/iquanta.in\" \/>\n<meta property=\"article:published_time\" content=\"2025-05-16T06:39:57+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-05-16T06:39:59+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.iquanta.in\/blog\/wp-content\/uploads\/2025\/05\/Your-paragraph-text-11.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1600\" \/>\n\t<meta property=\"og:image:height\" content=\"900\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Nidhi Goswami\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Nidhi Goswami\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.iquanta.in\/blog\/counting-sort-algorithm-working-advantages-and-applications\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.iquanta.in\/blog\/counting-sort-algorithm-working-advantages-and-applications\/\"},\"author\":{\"name\":\"Nidhi Goswami\",\"@id\":\"https:\/\/www.iquanta.in\/blog\/#\/schema\/person\/ec8c8c25d0526dd86557b6fed064f7f3\"},\"headline\":\"Counting Sort Algorithm : Working, Advantages and Applications\",\"datePublished\":\"2025-05-16T06:39:57+00:00\",\"dateModified\":\"2025-05-16T06:39:59+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.iquanta.in\/blog\/counting-sort-algorithm-working-advantages-and-applications\/\"},\"wordCount\":1030,\"publisher\":{\"@id\":\"https:\/\/www.iquanta.in\/blog\/#organization\"},\"articleSection\":[\"DSA and Competitive Programming\",\"iSkills\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.iquanta.in\/blog\/counting-sort-algorithm-working-advantages-and-applications\/\",\"url\":\"https:\/\/www.iquanta.in\/blog\/counting-sort-algorithm-working-advantages-and-applications\/\",\"name\":\"Counting Sort Algorithm : Working, Advantages and Applications - iQuanta\",\"isPartOf\":{\"@id\":\"https:\/\/www.iquanta.in\/blog\/#website\"},\"datePublished\":\"2025-05-16T06:39:57+00:00\",\"dateModified\":\"2025-05-16T06:39:59+00:00\",\"description\":\"Discover non comparison based counting sort algorithm along with its working, time complexity, advantages and disadvantages.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.iquanta.in\/blog\/counting-sort-algorithm-working-advantages-and-applications\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.iquanta.in\/blog\/counting-sort-algorithm-working-advantages-and-applications\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.iquanta.in\/blog\/counting-sort-algorithm-working-advantages-and-applications\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.iquanta.in\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Counting Sort Algorithm : Working, Advantages and Applications\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.iquanta.in\/blog\/#website\",\"url\":\"https:\/\/www.iquanta.in\/blog\/\",\"name\":\"iQuanta | Cat Preparation Online\",\"description\":\"Building Learning Networks\",\"publisher\":{\"@id\":\"https:\/\/www.iquanta.in\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.iquanta.in\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.iquanta.in\/blog\/#organization\",\"name\":\"IQuanta\",\"url\":\"https:\/\/www.iquanta.in\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.iquanta.in\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.iquanta.in\/blog\/wp-content\/uploads\/2018\/08\/IQuanta-1.png\",\"contentUrl\":\"https:\/\/www.iquanta.in\/blog\/wp-content\/uploads\/2018\/08\/IQuanta-1.png\",\"width\":525,\"height\":200,\"caption\":\"IQuanta\"},\"image\":{\"@id\":\"https:\/\/www.iquanta.in\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/facebook.com\/iquanta.in\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.iquanta.in\/blog\/#\/schema\/person\/ec8c8c25d0526dd86557b6fed064f7f3\",\"name\":\"Nidhi Goswami\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.iquanta.in\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/21d234d87afd924b217d26b25a3cf1ee?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/21d234d87afd924b217d26b25a3cf1ee?s=96&d=mm&r=g\",\"caption\":\"Nidhi Goswami\"},\"url\":\"https:\/\/www.iquanta.in\/blog\/author\/nidhigoswami\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Counting Sort Algorithm : Working, Advantages and Applications - iQuanta","description":"Discover non comparison based counting sort algorithm along with its working, time complexity, advantages and disadvantages.","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:\/\/www.iquanta.in\/blog\/counting-sort-algorithm-working-advantages-and-applications\/","og_locale":"en_US","og_type":"article","og_title":"Counting Sort Algorithm : Working, Advantages and Applications","og_description":"Discover non comparison based counting sort algorithm along with its working, time complexity, advantages and disadvantages.","og_url":"https:\/\/www.iquanta.in\/blog\/counting-sort-algorithm-working-advantages-and-applications\/","og_site_name":"iQuanta","article_publisher":"https:\/\/facebook.com\/iquanta.in","article_published_time":"2025-05-16T06:39:57+00:00","article_modified_time":"2025-05-16T06:39:59+00:00","og_image":[{"width":1600,"height":900,"url":"https:\/\/www.iquanta.in\/blog\/wp-content\/uploads\/2025\/05\/Your-paragraph-text-11.jpg","type":"image\/jpeg"}],"author":"Nidhi Goswami","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Nidhi Goswami","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.iquanta.in\/blog\/counting-sort-algorithm-working-advantages-and-applications\/#article","isPartOf":{"@id":"https:\/\/www.iquanta.in\/blog\/counting-sort-algorithm-working-advantages-and-applications\/"},"author":{"name":"Nidhi Goswami","@id":"https:\/\/www.iquanta.in\/blog\/#\/schema\/person\/ec8c8c25d0526dd86557b6fed064f7f3"},"headline":"Counting Sort Algorithm : Working, Advantages and Applications","datePublished":"2025-05-16T06:39:57+00:00","dateModified":"2025-05-16T06:39:59+00:00","mainEntityOfPage":{"@id":"https:\/\/www.iquanta.in\/blog\/counting-sort-algorithm-working-advantages-and-applications\/"},"wordCount":1030,"publisher":{"@id":"https:\/\/www.iquanta.in\/blog\/#organization"},"articleSection":["DSA and Competitive Programming","iSkills"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.iquanta.in\/blog\/counting-sort-algorithm-working-advantages-and-applications\/","url":"https:\/\/www.iquanta.in\/blog\/counting-sort-algorithm-working-advantages-and-applications\/","name":"Counting Sort Algorithm : Working, Advantages and Applications - iQuanta","isPartOf":{"@id":"https:\/\/www.iquanta.in\/blog\/#website"},"datePublished":"2025-05-16T06:39:57+00:00","dateModified":"2025-05-16T06:39:59+00:00","description":"Discover non comparison based counting sort algorithm along with its working, time complexity, advantages and disadvantages.","breadcrumb":{"@id":"https:\/\/www.iquanta.in\/blog\/counting-sort-algorithm-working-advantages-and-applications\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.iquanta.in\/blog\/counting-sort-algorithm-working-advantages-and-applications\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.iquanta.in\/blog\/counting-sort-algorithm-working-advantages-and-applications\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.iquanta.in\/blog\/"},{"@type":"ListItem","position":2,"name":"Counting Sort Algorithm : Working, Advantages and Applications"}]},{"@type":"WebSite","@id":"https:\/\/www.iquanta.in\/blog\/#website","url":"https:\/\/www.iquanta.in\/blog\/","name":"iQuanta | Cat Preparation Online","description":"Building Learning Networks","publisher":{"@id":"https:\/\/www.iquanta.in\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.iquanta.in\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.iquanta.in\/blog\/#organization","name":"IQuanta","url":"https:\/\/www.iquanta.in\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.iquanta.in\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.iquanta.in\/blog\/wp-content\/uploads\/2018\/08\/IQuanta-1.png","contentUrl":"https:\/\/www.iquanta.in\/blog\/wp-content\/uploads\/2018\/08\/IQuanta-1.png","width":525,"height":200,"caption":"IQuanta"},"image":{"@id":"https:\/\/www.iquanta.in\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/facebook.com\/iquanta.in"]},{"@type":"Person","@id":"https:\/\/www.iquanta.in\/blog\/#\/schema\/person\/ec8c8c25d0526dd86557b6fed064f7f3","name":"Nidhi Goswami","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.iquanta.in\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/21d234d87afd924b217d26b25a3cf1ee?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/21d234d87afd924b217d26b25a3cf1ee?s=96&d=mm&r=g","caption":"Nidhi Goswami"},"url":"https:\/\/www.iquanta.in\/blog\/author\/nidhigoswami\/"}]}},"_links":{"self":[{"href":"https:\/\/www.iquanta.in\/blog\/wp-json\/wp\/v2\/posts\/49179"}],"collection":[{"href":"https:\/\/www.iquanta.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.iquanta.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.iquanta.in\/blog\/wp-json\/wp\/v2\/users\/560"}],"replies":[{"embeddable":true,"href":"https:\/\/www.iquanta.in\/blog\/wp-json\/wp\/v2\/comments?post=49179"}],"version-history":[{"count":13,"href":"https:\/\/www.iquanta.in\/blog\/wp-json\/wp\/v2\/posts\/49179\/revisions"}],"predecessor-version":[{"id":49231,"href":"https:\/\/www.iquanta.in\/blog\/wp-json\/wp\/v2\/posts\/49179\/revisions\/49231"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.iquanta.in\/blog\/wp-json\/wp\/v2\/media\/49232"}],"wp:attachment":[{"href":"https:\/\/www.iquanta.in\/blog\/wp-json\/wp\/v2\/media?parent=49179"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.iquanta.in\/blog\/wp-json\/wp\/v2\/categories?post=49179"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.iquanta.in\/blog\/wp-json\/wp\/v2\/tags?post=49179"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}