{"id":453,"date":"2023-05-04T20:00:22","date_gmt":"2023-05-04T20:00:22","guid":{"rendered":"https:\/\/vmlogger.com\/algorithms\/?p=453"},"modified":"2023-05-04T20:01:30","modified_gmt":"2023-05-04T20:01:30","slug":"heap-sort-an-explanation-and-implementation","status":"publish","type":"post","link":"https:\/\/vmlogger.com\/algorithms\/2023\/05\/04\/heap-sort-an-explanation-and-implementation\/","title":{"rendered":"Heap Sort : An Explanation and Implementation"},"content":{"rendered":"

In the series of sorting algorithms<\/a>, this is the 4th sorting algorithm which is quite popular because of its better time complexity. From the name of this sorting algorithm, you can already guess that this sorting method is based on the Heap data structure<\/a>. It was first proposed by J.W.J. Williams in 1964 and was later improved by R.W. Floyd in 1969. We have already learned about Heap data structure<\/a> implementation in Python. In this article, we will discuss the Heap Sort algorithm and its implementation in Python.<\/p>\n

Heap Sort Algorithm<\/h2>\n

The heap Sort algorithm works by building a binary heap from the input array and then repeatedly extracting the maximum or minimum element from the heap and placing it at the end of the sorted array. The process is repeated until all the elements are sorted.<\/p>\n

The heap Sort algorithm has a time complexity of O(n log n)<\/code>, which makes it one of the fastest sorting algorithms. It is also an in-place sorting algorithm, meaning it does not require additional memory to sort the array.<\/p>\n

How does Heap Sort Algorithm work?<\/h2>\n

The Heap Sort algorithm works as follows:<\/p>\n

\n
    \n
  1. First build a maxHeap data structure from the provided array<\/li>\n
  2. The first item of the heapified array will the maximum among all the array items [based on the definition of maxHeap Data structure]<\/li>\n
  3. Replace the last item with this first item. This way, the highest value becomes the last item in the array <\/li>\n
  4. Now, repeat the same process on the same array by one less time than the previous one [because after every loop, the last item will be at the right place ]<\/li>\n<\/ol>\n<\/div>\n

    Step 1. Building a Heap data structure<\/a>:<\/h3>\n

    In this phase, a binary heap is built from the input array. A binary heap is a complete binary tree where the parent node is always greater than its child nodes. There are two types of binary heaps: max heap and min heap. In the Heap Sort algorithm, we use a max heap, where the root node is the maximum element in the heap.
    \nTo build a heap from an array, we start from the middle element of the array and heapify each sub-tree until the entire array is heapified. The heapify operation is performed by comparing the parent node with its child nodes and swapping them if necessary.<\/p>\n

    \r\n# to build the heap at first\r\ndef buildHeap(array):\r\n    parentNodeIdx = (len(array) - 2) \/\/ 2\r\n    for idx in reversed(range(parentNodeIdx + 1)):\r\n        moveDown(array, idx, len(array) - 1)\r\n\r\ndef moveDown(heap, startIdx, endIdx):\r\n    childOneIdx = startIdx * 2 + 1\r\n    while childOneIdx <= endIdx:\r\n        if (startIdx * 2 + 2) <= endIdx:\r\n            childTwoIdx = startIdx * 2 + 2\r\n        else:\r\n            childTwoIdx = -1\r\n        if childTwoIdx != -1 and heap[childTwoIdx] < heap[childOneIdx]:\r\n            possibleSwapIdx = childTwoIdx\r\n        else:\r\n            possibleSwapIdx = childOneIdx\r\n        if heap[possibleSwapIdx] < heap[startIdx]:\r\n            heap[startIdx], heap[possibleSwapIdx] = (\r\n                heap[possibleSwapIdx],\r\n                heap[startIdx],\r\n            )\r\n            startIdx = possibleSwapIdx\r\n            childOneIdx = startIdx * 2 + 1\r\n        else:\r\n            return\r\n<\/pre>\n

    Step 2,3 and 4: Extracting Maximum Element and repeat the same process<\/h3>\n

    In this phase, we repeatedly extract the maximum element from the heap and place it at the end of the sorted array. After each extraction, we heapify the remaining elements to maintain the heap property. We repeat this process until all the elements are sorted. It is done by the following piece of code:<\/p>\n

    \r\ndef heapSorting(array):\r\n\r\n    \"\"\"\r\n    Complexity:\r\n        best    :   O(n log(n))\r\n        average :   O(n log(n))\r\n        worst   :   O(n log(n))\r\n    parameters:\r\n        arrayToSort : Array to be sorted\r\n\r\n    returns:\r\n        sorted array\r\n    \"\"\"\r\n\r\n    buildHeap(array)\r\n    for idx in reversed(range(1, len(array))):\r\n        array[0], array[idx] = array[idx], array[0]\r\n        moveDown(array, 0, idx - 1)\r\n    return array\r\n<\/pre>\n

    Conclusion<\/h2>\n

    The heap Sort algorithm is a popular and efficient sorting algorithm that uses a binary heap data structure to sort elements. It has a time complexity of O(n log(n))<\/code> in all cases such as worst, average, and best. Keep in mind that it is an in-place sorting algorithm, which means you do not need to define any other array or data structure to store the sorted array rather sorting happens in the same array space. In this article, I have discussed the Heap Sort algorithm and its implementation in Python. Do let me know your thoughts on this algorithm in the comments below. If you like it share it with your friends and colleagues.<\/p>\n<\/span>","protected":false},"excerpt":{"rendered":"

    In the series of sorting algorithms, this is the 4th sorting algorithm which is quite popular because of its better time complexity. From the name of this sorting algorithm, you can already guess that this sorting method is based on the Heap data structure. It was first proposed by J.W.J. Williams in 1964 and was […]<\/p>\n","protected":false},"author":45,"featured_media":467,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[4,10],"tags":[],"class_list":["post-453","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-difficult","category-sorting"],"yoast_head":"\nHeap Sort : An Explanation and Implementation - Algorithms<\/title>\n<meta name=\"description\" content=\"One of the best sorting algorithm | Heap Sorting algorithm using Python | maxHeap data structure to sort an array in descending order\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/vmlogger.com\/algorithms\/2023\/05\/04\/heap-sort-an-explanation-and-implementation\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Heap Sort : An Explanation and Implementation\" \/>\n<meta property=\"og:description\" content=\"One of the best sorting algorithm | Heap Sorting algorithm using Python | maxHeap data structure to sort an array in descending order\" \/>\n<meta property=\"og:url\" content=\"https:\/\/vmlogger.com\/algorithms\/2023\/05\/04\/heap-sort-an-explanation-and-implementation\/\" \/>\n<meta property=\"og:site_name\" content=\"Algorithms\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/www.facebook.com\/vmlogger\" \/>\n<meta property=\"article:author\" content=\"http:\/\/www.facebook.com\/vmlogger\" \/>\n<meta property=\"article:published_time\" content=\"2023-05-04T20:00:22+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-05-04T20:01:30+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/vmlogger.com\/algorithms\/wp-content\/uploads\/sites\/15\/2023\/05\/heapsort.png\" \/>\n\t<meta property=\"og:image:width\" content=\"2560\" \/>\n\t<meta property=\"og:image:height\" content=\"1440\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Vishwamitra Mishra\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/www.twitter.com\/learnexcelmacro\" \/>\n<meta name=\"twitter:site\" content=\"@learnexcelmacro\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Vishwamitra Mishra\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/vmlogger.com\/algorithms\/2023\/05\/04\/heap-sort-an-explanation-and-implementation\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/vmlogger.com\/algorithms\/2023\/05\/04\/heap-sort-an-explanation-and-implementation\/\"},\"author\":{\"name\":\"Vishwamitra Mishra\",\"@id\":\"https:\/\/vmlogger.com\/algorithms\/#\/schema\/person\/7500a107b0b2d35a8492acf0d11fc8e5\"},\"headline\":\"Heap Sort : An Explanation and Implementation\",\"datePublished\":\"2023-05-04T20:00:22+00:00\",\"dateModified\":\"2023-05-04T20:01:30+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/vmlogger.com\/algorithms\/2023\/05\/04\/heap-sort-an-explanation-and-implementation\/\"},\"wordCount\":568,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/vmlogger.com\/algorithms\/#\/schema\/person\/7500a107b0b2d35a8492acf0d11fc8e5\"},\"image\":{\"@id\":\"https:\/\/vmlogger.com\/algorithms\/2023\/05\/04\/heap-sort-an-explanation-and-implementation\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/vmlogger.com\/algorithms\/wp-content\/uploads\/sites\/15\/2023\/05\/heapsort.png\",\"articleSection\":[\"Difficult\",\"Sorting\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/vmlogger.com\/algorithms\/2023\/05\/04\/heap-sort-an-explanation-and-implementation\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/vmlogger.com\/algorithms\/2023\/05\/04\/heap-sort-an-explanation-and-implementation\/\",\"url\":\"https:\/\/vmlogger.com\/algorithms\/2023\/05\/04\/heap-sort-an-explanation-and-implementation\/\",\"name\":\"Heap Sort : An Explanation and Implementation - Algorithms\",\"isPartOf\":{\"@id\":\"https:\/\/vmlogger.com\/algorithms\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/vmlogger.com\/algorithms\/2023\/05\/04\/heap-sort-an-explanation-and-implementation\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/vmlogger.com\/algorithms\/2023\/05\/04\/heap-sort-an-explanation-and-implementation\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/vmlogger.com\/algorithms\/wp-content\/uploads\/sites\/15\/2023\/05\/heapsort.png\",\"datePublished\":\"2023-05-04T20:00:22+00:00\",\"dateModified\":\"2023-05-04T20:01:30+00:00\",\"description\":\"One of the best sorting algorithm | Heap Sorting algorithm using Python | maxHeap data structure to sort an array in descending order\",\"breadcrumb\":{\"@id\":\"https:\/\/vmlogger.com\/algorithms\/2023\/05\/04\/heap-sort-an-explanation-and-implementation\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/vmlogger.com\/algorithms\/2023\/05\/04\/heap-sort-an-explanation-and-implementation\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/vmlogger.com\/algorithms\/2023\/05\/04\/heap-sort-an-explanation-and-implementation\/#primaryimage\",\"url\":\"https:\/\/vmlogger.com\/algorithms\/wp-content\/uploads\/sites\/15\/2023\/05\/heapsort.png\",\"contentUrl\":\"https:\/\/vmlogger.com\/algorithms\/wp-content\/uploads\/sites\/15\/2023\/05\/heapsort.png\",\"width\":2560,\"height\":1440,\"caption\":\"Heap Sort in Python\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/vmlogger.com\/algorithms\/2023\/05\/04\/heap-sort-an-explanation-and-implementation\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/vmlogger.com\/algorithms\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Heap Sort : An Explanation and Implementation\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/vmlogger.com\/algorithms\/#website\",\"url\":\"https:\/\/vmlogger.com\/algorithms\/\",\"name\":\"Algorithms\",\"description\":\"Welcome to the World of Algorithms\",\"publisher\":{\"@id\":\"https:\/\/vmlogger.com\/algorithms\/#\/schema\/person\/7500a107b0b2d35a8492acf0d11fc8e5\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/vmlogger.com\/algorithms\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/vmlogger.com\/algorithms\/#\/schema\/person\/7500a107b0b2d35a8492acf0d11fc8e5\",\"name\":\"Vishwamitra Mishra\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/vmlogger.com\/algorithms\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/vmlogger.com\/algorithms\/wp-content\/uploads\/sites\/15\/2023\/03\/welcome-1.png\",\"contentUrl\":\"https:\/\/vmlogger.com\/algorithms\/wp-content\/uploads\/sites\/15\/2023\/03\/welcome-1.png\",\"width\":1963,\"height\":843,\"caption\":\"Vishwamitra Mishra\"},\"logo\":{\"@id\":\"https:\/\/vmlogger.com\/algorithms\/#\/schema\/person\/image\/\"},\"description\":\"My name is Vishwamitra Mishra. Friends Call me Vishwa. I hold a Bachelor\u2019s Degree in Computer Science from D.A.V.V. Indore & currently working as a Technical Lead having over 7 years of experience.\",\"sameAs\":[\"http:\/\/www.learnexcelmacro.com\",\"http:\/\/www.facebook.com\/vmlogger\",\"https:\/\/x.com\/https:\/\/www.twitter.com\/learnexcelmacro\",\"https:\/\/www.youtube.com\/c\/VMLogger\"],\"url\":\"https:\/\/vmlogger.com\/algorithms\/author\/vishwamitra\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Heap Sort : An Explanation and Implementation - Algorithms","description":"One of the best sorting algorithm | Heap Sorting algorithm using Python | maxHeap data structure to sort an array in descending order","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:\/\/vmlogger.com\/algorithms\/2023\/05\/04\/heap-sort-an-explanation-and-implementation\/","og_locale":"en_US","og_type":"article","og_title":"Heap Sort : An Explanation and Implementation","og_description":"One of the best sorting algorithm | Heap Sorting algorithm using Python | maxHeap data structure to sort an array in descending order","og_url":"https:\/\/vmlogger.com\/algorithms\/2023\/05\/04\/heap-sort-an-explanation-and-implementation\/","og_site_name":"Algorithms","article_publisher":"http:\/\/www.facebook.com\/vmlogger","article_author":"http:\/\/www.facebook.com\/vmlogger","article_published_time":"2023-05-04T20:00:22+00:00","article_modified_time":"2023-05-04T20:01:30+00:00","og_image":[{"width":2560,"height":1440,"url":"https:\/\/vmlogger.com\/algorithms\/wp-content\/uploads\/sites\/15\/2023\/05\/heapsort.png","type":"image\/png"}],"author":"Vishwamitra Mishra","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/www.twitter.com\/learnexcelmacro","twitter_site":"@learnexcelmacro","twitter_misc":{"Written by":"Vishwamitra Mishra","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/vmlogger.com\/algorithms\/2023\/05\/04\/heap-sort-an-explanation-and-implementation\/#article","isPartOf":{"@id":"https:\/\/vmlogger.com\/algorithms\/2023\/05\/04\/heap-sort-an-explanation-and-implementation\/"},"author":{"name":"Vishwamitra Mishra","@id":"https:\/\/vmlogger.com\/algorithms\/#\/schema\/person\/7500a107b0b2d35a8492acf0d11fc8e5"},"headline":"Heap Sort : An Explanation and Implementation","datePublished":"2023-05-04T20:00:22+00:00","dateModified":"2023-05-04T20:01:30+00:00","mainEntityOfPage":{"@id":"https:\/\/vmlogger.com\/algorithms\/2023\/05\/04\/heap-sort-an-explanation-and-implementation\/"},"wordCount":568,"commentCount":0,"publisher":{"@id":"https:\/\/vmlogger.com\/algorithms\/#\/schema\/person\/7500a107b0b2d35a8492acf0d11fc8e5"},"image":{"@id":"https:\/\/vmlogger.com\/algorithms\/2023\/05\/04\/heap-sort-an-explanation-and-implementation\/#primaryimage"},"thumbnailUrl":"https:\/\/vmlogger.com\/algorithms\/wp-content\/uploads\/sites\/15\/2023\/05\/heapsort.png","articleSection":["Difficult","Sorting"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/vmlogger.com\/algorithms\/2023\/05\/04\/heap-sort-an-explanation-and-implementation\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/vmlogger.com\/algorithms\/2023\/05\/04\/heap-sort-an-explanation-and-implementation\/","url":"https:\/\/vmlogger.com\/algorithms\/2023\/05\/04\/heap-sort-an-explanation-and-implementation\/","name":"Heap Sort : An Explanation and Implementation - Algorithms","isPartOf":{"@id":"https:\/\/vmlogger.com\/algorithms\/#website"},"primaryImageOfPage":{"@id":"https:\/\/vmlogger.com\/algorithms\/2023\/05\/04\/heap-sort-an-explanation-and-implementation\/#primaryimage"},"image":{"@id":"https:\/\/vmlogger.com\/algorithms\/2023\/05\/04\/heap-sort-an-explanation-and-implementation\/#primaryimage"},"thumbnailUrl":"https:\/\/vmlogger.com\/algorithms\/wp-content\/uploads\/sites\/15\/2023\/05\/heapsort.png","datePublished":"2023-05-04T20:00:22+00:00","dateModified":"2023-05-04T20:01:30+00:00","description":"One of the best sorting algorithm | Heap Sorting algorithm using Python | maxHeap data structure to sort an array in descending order","breadcrumb":{"@id":"https:\/\/vmlogger.com\/algorithms\/2023\/05\/04\/heap-sort-an-explanation-and-implementation\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/vmlogger.com\/algorithms\/2023\/05\/04\/heap-sort-an-explanation-and-implementation\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/vmlogger.com\/algorithms\/2023\/05\/04\/heap-sort-an-explanation-and-implementation\/#primaryimage","url":"https:\/\/vmlogger.com\/algorithms\/wp-content\/uploads\/sites\/15\/2023\/05\/heapsort.png","contentUrl":"https:\/\/vmlogger.com\/algorithms\/wp-content\/uploads\/sites\/15\/2023\/05\/heapsort.png","width":2560,"height":1440,"caption":"Heap Sort in Python"},{"@type":"BreadcrumbList","@id":"https:\/\/vmlogger.com\/algorithms\/2023\/05\/04\/heap-sort-an-explanation-and-implementation\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/vmlogger.com\/algorithms\/"},{"@type":"ListItem","position":2,"name":"Heap Sort : An Explanation and Implementation"}]},{"@type":"WebSite","@id":"https:\/\/vmlogger.com\/algorithms\/#website","url":"https:\/\/vmlogger.com\/algorithms\/","name":"Algorithms","description":"Welcome to the World of Algorithms","publisher":{"@id":"https:\/\/vmlogger.com\/algorithms\/#\/schema\/person\/7500a107b0b2d35a8492acf0d11fc8e5"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/vmlogger.com\/algorithms\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/vmlogger.com\/algorithms\/#\/schema\/person\/7500a107b0b2d35a8492acf0d11fc8e5","name":"Vishwamitra Mishra","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/vmlogger.com\/algorithms\/#\/schema\/person\/image\/","url":"https:\/\/vmlogger.com\/algorithms\/wp-content\/uploads\/sites\/15\/2023\/03\/welcome-1.png","contentUrl":"https:\/\/vmlogger.com\/algorithms\/wp-content\/uploads\/sites\/15\/2023\/03\/welcome-1.png","width":1963,"height":843,"caption":"Vishwamitra Mishra"},"logo":{"@id":"https:\/\/vmlogger.com\/algorithms\/#\/schema\/person\/image\/"},"description":"My name is Vishwamitra Mishra. Friends Call me Vishwa. I hold a Bachelor\u2019s Degree in Computer Science from D.A.V.V. Indore & currently working as a Technical Lead having over 7 years of experience.","sameAs":["http:\/\/www.learnexcelmacro.com","http:\/\/www.facebook.com\/vmlogger","https:\/\/x.com\/https:\/\/www.twitter.com\/learnexcelmacro","https:\/\/www.youtube.com\/c\/VMLogger"],"url":"https:\/\/vmlogger.com\/algorithms\/author\/vishwamitra\/"}]}},"_links":{"self":[{"href":"https:\/\/vmlogger.com\/algorithms\/wp-json\/wp\/v2\/posts\/453"}],"collection":[{"href":"https:\/\/vmlogger.com\/algorithms\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vmlogger.com\/algorithms\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vmlogger.com\/algorithms\/wp-json\/wp\/v2\/users\/45"}],"replies":[{"embeddable":true,"href":"https:\/\/vmlogger.com\/algorithms\/wp-json\/wp\/v2\/comments?post=453"}],"version-history":[{"count":7,"href":"https:\/\/vmlogger.com\/algorithms\/wp-json\/wp\/v2\/posts\/453\/revisions"}],"predecessor-version":[{"id":468,"href":"https:\/\/vmlogger.com\/algorithms\/wp-json\/wp\/v2\/posts\/453\/revisions\/468"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/vmlogger.com\/algorithms\/wp-json\/wp\/v2\/media\/467"}],"wp:attachment":[{"href":"https:\/\/vmlogger.com\/algorithms\/wp-json\/wp\/v2\/media?parent=453"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vmlogger.com\/algorithms\/wp-json\/wp\/v2\/categories?post=453"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vmlogger.com\/algorithms\/wp-json\/wp\/v2\/tags?post=453"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}