{"id":2014,"date":"2023-06-12T14:39:17","date_gmt":"2023-06-12T09:09:17","guid":{"rendered":"https:\/\/www.interviewbit.com\/blog\/?p=2014"},"modified":"2023-06-12T16:47:39","modified_gmt":"2023-06-12T11:17:39","slug":"longest-increasing-subsequence","status":"publish","type":"post","link":"https:\/\/www.interviewbit.com\/blog\/longest-increasing-subsequence\/","title":{"rendered":"Longest Increasing Subsequence"},"content":{"rendered":"\n<div class=\"gutentoc tocactive ullist\"><div class=\"gutentoc-toc-wrap\"><div class=\"gutentoc-toc-title-wrap\"><div class=\"gutentoc-toc-title\">Table Of Contents<\/div><div id=\"open\" class=\"text_open\">show<\/div><\/div><div id=\"toclist\"><div class=\"gutentoc-toc__list-wrap\"><ul class=\"gutentoc-toc__list\"><li><a href=\"#problem-statement\">Problem Statement<\/a><\/li><li><a href=\"#1-simple-approach\">1. Simple Approach<\/a><\/li><ul class=\"gutentoc-toc__list\"><li><a href=\"#recursive-tree-of-simple-approach\">Recursive-tree of Simple Approach<\/a><\/li><li><a href=\"#pseudo-code\">Pseudo-Code<\/a><\/li><\/ul><li><a href=\"#2-dynamic-programming-approach\">2. Dynamic Programming Approach<\/a><\/li><ul class=\"gutentoc-toc__list\"><li><a href=\"#elements-of-dynamic-programming-approach\">Elements of Dynamic Programming Approach<\/a><\/li><li><a href=\"#dry-run-of-this-approach\">Dry Run of this approach<\/a><\/li><li><a href=\"#implementation\">Implementation<\/a><\/li><ul class=\"gutentoc-toc__list\"><li><a href=\"#c-implementation\">C++ Implementation<\/a><\/li><li><a href=\"#java-implementation\">Java Implementation<\/a><\/li><li><a href=\"#python-implementation\">Python Implementation<\/a><\/li><\/ul><\/ul><li><a href=\"#3-greedy-with-binary-search-efficient-approach\">3. Greedy With Binary Search: Efficient Approach<\/a><\/li><ul class=\"gutentoc-toc__list\"><li><a href=\"#c-implementation-of-greedy-approach\">C++ Implementation of Greedy Approach<\/a><\/li><li><a href=\"#-java-implementation-of-greedy-approach\"><meta charset=\"utf-8\">Java Implementation of Greedy Approach<\/a><\/li><li><a href=\"#python-implementation-of-greedy-approach\">Python Implementation of Greedy Approach<\/a><\/li><\/ul><li><a href=\"#4-bonus-code-get-the-longest-increasing-subsequence-path\">4. [BONUS CODE] Get the Longest Increasing Subsequence Path<\/a><\/li><ul class=\"gutentoc-toc__list\"><li><a href=\"#c-code\">C++ Code<\/a><\/li><li><a href=\"#python-code\">Python Code<\/a><\/li><\/ul><li><a href=\"#practice-questions\">Practice Questions<\/a><\/li><li><a href=\"#frequently-asked-questions\">Frequently Asked Questions<\/a><\/li><ul class=\"gutentoc-toc__list\"><li><a href=\"#q1-what-is-an-application-of-the-longest-common-subsequence\">Q.1: What is an application of the longest common subsequence?<\/a><\/li><li><a href=\"#q2-is-the-longest-increasing-subsequence-np-hard\">Q.2: Is the longest Increasing Subsequence NP hard?<\/a><\/li><\/ul><\/ul><\/div><\/div><\/div><\/div>\n\n\n\n<p>The <strong>Longest Increasing Subsequence<\/strong> (LIS) problem is to find the length of the longest subsequence of a given sequence such that all elements of the subsequence are sorted in increasing order.<\/p>\n\n\n\n<h2 id=\"problem-statement\">Problem Statement<\/h2>\n\n\n\n<p>For example, the length of LIS for {10, 22, 9, 33, 21, 50, 41, 60, 80} is 6 and LIS is {10, 22, 33, 50, 60, 80}.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img  loading=\"lazy\"  width=\"830\"  height=\"205\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"LIS\"  class=\"wp-image-2017 pk-lazyload\"  data-pk-sizes=\"auto\"  data-ls-sizes=\"(max-width: 830px) 100vw, 830px\"  data-pk-src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/09\/2-1.jpg\"  data-pk-srcset=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/09\/2-1.jpg 830w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/09\/2-1-300x74.jpg 300w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/09\/2-1-768x190.jpg 768w\" ><\/figure>\n\n\n\n<p><strong>Example 1:<\/strong><\/p>\n\n\n\n<ul><li><strong>Input:<\/strong> arr[] = {5,4,1,2,3}<\/li><li><strong>Output:<\/strong> Length of LIS = 3<\/li><\/ul>\n\n\n\n<p><em><strong>Explanation:<\/strong> The longest increasing subsequence is 1,2,3<\/em><\/p>\n\n\n\n<p><strong>Example 2:<\/strong><\/p>\n\n\n\n<ul><li><strong>Input:<\/strong> arr[] = {7,5}<\/li><li><strong>Output:<\/strong> Length of LIS = 1<\/li><\/ul>\n\n\n\n<p><em><strong>Explanation:<\/strong> The longest increasing subsequences are {5} or {7}.<\/em><\/p>\n\n\n\n<h2 id=\"1-simple-approach\">1. Simple Approach<\/h2>\n\n\n\n<ul><li>Let\u2019s try to learn by taking an example.<\/li><li>arr[] = {3,10,2,11}<\/li><li>If we will think about any subsequence then it can start from anywhere so to figure this out we can apply a simple approach to fix every index so that we can easily be able to calculate the subsequent at each ending index. And from this, we can find a recurrence relation.<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>\nlis_ending_here(arr, i) = 1 + lis_ending_here(arr, j) --&gt; j &lt; i and arr&#91;j] &lt; arr&#91;i].\n\n<\/code><\/pre>\n\n\n\n<h3 id=\"recursive-tree-of-simple-approach\">Recursive-tree of Simple Approach<\/h3>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img  loading=\"lazy\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"\"  class=\"wp-image-2019 pk-lazyload\"  width=\"687\"  height=\"386\"  data-pk-sizes=\"auto\"  data-ls-sizes=\"(max-width: 687px) 100vw, 687px\"  data-pk-src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/09\/Recursive-Tree-Approach-1024x576.png\"  data-pk-srcset=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/09\/Recursive-Tree-Approach-1024x576.png 1024w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/09\/Recursive-Tree-Approach-300x169.png 300w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/09\/Recursive-Tree-Approach-768x432.png 768w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/09\/Recursive-Tree-Approach.png 1280w\" ><figcaption><meta charset=\"utf-8\">Recursive-tree of Simple Approach<\/figcaption><\/figure><\/div>\n\n\n\n<h3 id=\"pseudo-code\">Pseudo-Code<\/h3>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"raw\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">int lis_ending_here(int arr[], int curr) {\n  \/\/ Only one subsequence ends at first index, the number itself\n  if (curr == 0)\n    return 1\n  int ans = 1\n  for (i = curr - 1 to 0, decrement of -1)\n    if (arr[i] &lt; arr[curr])\n      ans = max(ans, 1 + lis_ending_here(arr, i))\n  return ans\n}\nint longest_increasing_subsequence(int arr[], int N) {\n  \/\/ Because a single number can be a subsequence too\n  int max_ans = 1\n  for (i = 0 to N - 1)\n    max_ans = max(max_ans, lis_ending_here(arr, i))\n  return max_ans\n}<\/pre>\n\n\n\n<ul><li><strong>Time complexity:<\/strong> O(2^N), Where N is the size of the array.<\/li><li><strong>Space complexity:<\/strong> O(N) for stack space in recursion.<\/li><\/ul>\n\n\n\n<h2 id=\"2-dynamic-programming-approach\">2. Dynamic Programming Approach<\/h2>\n\n\n\n<p>If we will draw the recursion tree for the above approach then we can easily see in the below image, there are some overlapping subproblems to which we can easily apply substructure properties. Hence we can say we can store some state and use it in <a rel=\"noreferrer noopener\" href=\"https:\/\/www.interviewbit.com\/courses\/programming\/dynamic-programming\/\" target=\"_blank\">dynamic programming<\/a>.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img  loading=\"lazy\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"Dynamic Programming Approach\"  class=\"wp-image-2016 pk-lazyload\"  width=\"636\"  height=\"343\"  data-pk-sizes=\"auto\"  data-ls-sizes=\"(max-width: 636px) 100vw, 636px\"  data-pk-src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/09\/1-2.jpg\"  data-pk-srcset=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/09\/1-2.jpg 840w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/09\/1-2-300x162.jpg 300w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/09\/1-2-768x414.jpg 768w\" ><figcaption>Dynamic Programming Approach<\/figcaption><\/figure><\/div>\n\n\n\n<h3 id=\"elements-of-dynamic-programming-approach\">Elements of Dynamic Programming Approach<\/h3>\n\n\n\n<p>Here the recursion approach is top-down. Hence we can use it in the implementation of our dynamic programming bottom-up. What are the different states or elements that are possible for dynamic programmatic<\/p>\n\n\n\n<p><strong>We have to define problem variables: <\/strong>There is only one parameter on which the state of the problem depends i.e. which is N here, the size of the array.<\/p>\n\n\n\n<p><strong>We have to define size and table structure: <\/strong>For to write the code in a bottom-up manner we have to first define the size and table structure.<\/p>\n\n\n\n<h3 id=\"dry-run-of-this-approach\">Dry Run of this approach<\/h3>\n\n\n\n<p>Input: arr[] = {3, 10, 2, 11}<br>LIS[] = {1, 1, 1, 1} (initially)<\/p>\n\n\n\n<p><strong>Iteration-wise simulation:<\/strong><\/p>\n\n\n\n<ol><li>arr[2] &gt; arr[1] {LIS[2] = max(LIS [2], LIS[1]+1 = 2}<\/li><li>arr[3] &lt; arr[1] {No change}<\/li><li>arr[3] &lt; arr[2] {No change}<\/li><li>arr[4] &gt; arr[1] {LIS[4] = max(LIS [4], LIS[1]+1 = 2}<\/li><li>arr[4] &gt; arr[2] {LIS[4] = max(LIS [4], LIS[2]+1 = 3}<\/li><li>arr[4] &gt; arr[3] {LIS[4] = max(LIS [4], LIS[3]+1 = 3}<\/li><\/ol>\n\n\n\n<h3 id=\"implementation\">Implementation<\/h3>\n\n\n\n<h4 id=\"c-implementation\">C++ Implementation<\/h4>\n\n\n\n<iframe style='max-width:100%; border: none; height: 375px; width: {width}px;' height=375 width=700 src=https:\/\/www.interviewbit.com\/embed\/snippet\/e01303ec1eb7923a2fd2 title='Interviewbit Ide snippet\/e01303ec1eb7923a2fd2' loading=\"lazy\" allow=\"clipboard-write\" allowfullscreen referrerpolicy=\"unsafe-url\" sandbox=\"allow-same-origin allow-scripts allow-popups allow-top-navigation-by-user-activation allow-popups-to-escape-sandbox\"><\/iframe>\n\n\n\n<h4 id=\"java-implementation\">Java Implementation<\/h4>\n\n\n\n<iframe style='max-width:100%; border: none; height: 375px; width: {width}px;' height=375 width=700 src=https:\/\/www.interviewbit.com\/embed\/snippet\/0c9e90cde5a0d2925412 title='Interviewbit Ide snippet\/0c9e90cde5a0d2925412' loading=\"lazy\" allow=\"clipboard-write\" allowfullscreen referrerpolicy=\"unsafe-url\" sandbox=\"allow-same-origin allow-scripts allow-popups allow-top-navigation-by-user-activation allow-popups-to-escape-sandbox\"><\/iframe>\n\n\n\n<h4 id=\"python-implementation\">Python Implementation<\/h4>\n\n\n\n<iframe style='max-width:100%; border: none; height: 375px; width: {width}px;' height=375 width=700 src=https:\/\/www.interviewbit.com\/embed\/snippet\/882c75d51a5991d033e2 title='Interviewbit Ide snippet\/882c75d51a5991d033e2' loading=\"lazy\" allow=\"clipboard-write\" allowfullscreen referrerpolicy=\"unsafe-url\" sandbox=\"allow-same-origin allow-scripts allow-popups allow-top-navigation-by-user-activation allow-popups-to-escape-sandbox\"><\/iframe>\n\n\n\n<ul><li><strong>Time complexity:<\/strong> O(N^2), Where N is the size of the array.<\/li><li><strong>Space complexity:<\/strong> O(N)<\/li><\/ul>\n\n\n\n<h2 id=\"3-greedy-with-binary-search-efficient-approach\">3. Greedy With Binary Search: Efficient Approach<\/h2>\n\n\n\n<p>Let&#8217;s take an example and try to construct LIS from this example<br><strong>Arr = [12, 16, 18, 13, 14, 15, 11]<\/strong><br>First of all take the subsequence starting with an empty one: <strong>lis = [].<\/strong><br>Let&#8217;s pick the first element, <strong>lis = [12]<\/strong>.<br><strong>16<\/strong> is greater than the previous number, <strong>lis = [12, 16]<\/strong><br><strong>18<\/strong> is greater than previous number, <strong>lis = [12, 16, 18]<\/strong><br><strong>13<\/strong> is less than the previous number, we can&#8217;t extend the subsequence lis, but we must keep <strong>13<\/strong> because in the future there may be the longest subsequence starting with <strong>[12, 13], sub1 = [12, 16, 18], ans = [12, 13]<\/strong>.<br>With <strong>14<\/strong>, we can&#8217;t extend sub1, but we can extend sub2, so <strong>lis = [12, 16, 18]<\/strong>, ans = <strong>[12, 13, 14]<\/strong>.<br>With <strong>15<\/strong>, we can&#8217;t extend sub1, but we can extend sub2, so <strong>lis = [12, 16, 18], ans = [12, 13, 14, 15].<\/strong><br>With <strong>11<\/strong>, we can&#8217;t extend neighter sub1 nor sub2, but we need to keep 1, so <strong>lis = [12, 16, 18], ans = [12, 13, 14, 15], new_lis = [11].<\/strong><\/p>\n\n\n\n<p><strong>Finally, the <\/strong>length of the <strong>longest increase subsequence = len(sub2) = 4.<\/strong><\/p>\n\n\n\n<p>If we take a small example or Arr=[2,6,8,3,4,5,1] then the below picture shows how we are just maintaining our longest subsequence array.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img  loading=\"lazy\"  width=\"754\"  height=\"483\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"maintaining our longest subsequence array\"  class=\"wp-image-2146 pk-lazyload\"  data-pk-sizes=\"auto\"  data-ls-sizes=\"(max-width: 754px) 100vw, 754px\"  data-pk-src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/09\/1-4.jpg\"  data-pk-srcset=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/09\/1-4.jpg 754w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/09\/1-4-300x192.jpg 300w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/09\/1-4-380x243.jpg 380w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/09\/1-4-550x352.jpg 550w\" ><\/figure><\/div>\n\n\n\n<h3 id=\"c-implementation-of-greedy-approach\">C++ Implementation of Greedy Approach<\/h3>\n\n\n\n<iframe style='max-width:100%; border: none; height: 375px; width: {width}px;' height=375 width=700 src=https:\/\/www.interviewbit.com\/embed\/snippet\/9328af27bc121df2da0a title='Interviewbit Ide snippet\/9328af27bc121df2da0a' loading=\"lazy\" allow=\"clipboard-write\" allowfullscreen referrerpolicy=\"unsafe-url\" sandbox=\"allow-same-origin allow-scripts allow-popups allow-top-navigation-by-user-activation allow-popups-to-escape-sandbox\"><\/iframe>\n\n\n\n<h3 id=\"-java-implementation-of-greedy-approach\"><span id=\"java-implementation-of-greedy-approach\"><meta charset=\"utf-8\">Java Implementation of Greedy Approach<\/span><\/h3>\n\n\n\n<iframe style='max-width:100%; border: none; height: 375px; width: {width}px;' height=375 width=700 src=https:\/\/www.interviewbit.com\/embed\/snippet\/cd9fb8ab722be3a2702c title='Interviewbit Ide snippet\/cd9fb8ab722be3a2702c' loading=\"lazy\" allow=\"clipboard-write\" allowfullscreen referrerpolicy=\"unsafe-url\" sandbox=\"allow-same-origin allow-scripts allow-popups allow-top-navigation-by-user-activation allow-popups-to-escape-sandbox\"><\/iframe>\n\n\n\n<h3 id=\"python-implementation-of-greedy-approach\">Python Implementation of Greedy Approach<\/h3>\n\n\n\n<iframe style='max-width:100%; border: none; height: 375px; width: {width}px;' height=375 width=700 src=https:\/\/www.interviewbit.com\/embed\/snippet\/5052f109a31ca840926a title='Interviewbit Ide snippet\/5052f109a31ca840926a' loading=\"lazy\" allow=\"clipboard-write\" allowfullscreen referrerpolicy=\"unsafe-url\" sandbox=\"allow-same-origin allow-scripts allow-popups allow-top-navigation-by-user-activation allow-popups-to-escape-sandbox\"><\/iframe>\n\n\n\n<h2 id=\"4-bonus-code-get-the-longest-increasing-subsequence-path\">4. [BONUS CODE] Get the Longest Increasing Subsequence Path<\/h2>\n\n\n\n<h3 id=\"c-code\">C++ Code<\/h3>\n\n\n\n<iframe style='max-width:100%; border: none; height: 375px; width: {width}px;' height=375 width=700 src=https:\/\/www.interviewbit.com\/embed\/snippet\/69bf702ad891b22a3e21 title='Interviewbit Ide snippet\/69bf702ad891b22a3e21' loading=\"lazy\" allow=\"clipboard-write\" allowfullscreen referrerpolicy=\"unsafe-url\" sandbox=\"allow-same-origin allow-scripts allow-popups allow-top-navigation-by-user-activation allow-popups-to-escape-sandbox\"><\/iframe>\n\n\n\n<h3 id=\"python-code\">Python Code<\/h3>\n\n\n\n<iframe style='max-width:100%; border: none; height: 375px; width: {width}px;' height=375 width=700 src=https:\/\/www.interviewbit.com\/embed\/snippet\/9d6585071576484c51c4 title='Interviewbit Ide snippet\/9d6585071576484c51c4' loading=\"lazy\" allow=\"clipboard-write\" allowfullscreen referrerpolicy=\"unsafe-url\" sandbox=\"allow-same-origin allow-scripts allow-popups allow-top-navigation-by-user-activation allow-popups-to-escape-sandbox\"><\/iframe>\n\n\n\n<p><strong>Time Complexity:<\/strong> O(NlogN)<br><strong>Space Complexity:<\/strong> O(N)<\/p>\n\n\n\n<h2 id=\"practice-questions\">Practice Questions<\/h2>\n\n\n\n<ul><li><a rel=\"noreferrer noopener\" href=\"https:\/\/www.interviewbit.com\/problems\/length-of-longest-subsequence\/\" target=\"_blank\">Length Of Longest Subsequence<\/a><\/li><li><a rel=\"noreferrer noopener\" href=\"https:\/\/www.interviewbit.com\/problems\/longest-increasing-subsequence\/\" target=\"_blank\">Longest Increasing Subsequence<\/a><\/li><\/ul>\n\n\n\n<h2 id=\"frequently-asked-questions\">Frequently Asked Questions<\/h2>\n\n\n\n<h3 id=\"q1-what-is-an-application-of-the-longest-common-subsequence\"><span id=\"q-1-what-is-an-application-of-the-longest-common-subsequence\">Q.1: What is an application of the longest common subsequence?<\/span><\/h3>\n\n\n\n<p id=\"what-is-an-application-of-the-longest-common-subsequence\"><strong>Ans:<\/strong> The longest common subsequence problem is a classic computer science problem, the basis of data comparison programs such as the difficulty, and has applications in computational linguistics and bioinformatics.<\/p>\n\n\n\n<h3 id=\"q2-is-the-longest-increasing-subsequence-np-hard\"><span id=\"q-2-is-the-longest-increasing-subsequence-np-hard\">Q.2: Is the longest Increasing Subsequence NP hard?<\/span><\/h3>\n\n\n\n<p><strong>Ans:<\/strong> No, as we can solve LIS in o(Nlogn) time complexity.<\/p>\n","protected":false},"excerpt":{"rendered":"The Longest Increasing Subsequence (LIS) problem is to find the length of the longest subsequence of a given&hellip;\n","protected":false},"author":5,"featured_media":2018,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_daextam_enable_autolinks":"1","csco_singular_sidebar":"","csco_page_header_type":"","csco_appearance_grid":"","csco_page_load_nextpost":"","csco_post_video_location":[],"csco_post_video_location_hash":"","csco_post_video_url":"","csco_post_video_bg_start_time":0,"csco_post_video_bg_end_time":0},"categories":[145],"tags":[195],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/posts\/2014"}],"collection":[{"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/comments?post=2014"}],"version-history":[{"count":11,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/posts\/2014\/revisions"}],"predecessor-version":[{"id":20020,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/posts\/2014\/revisions\/20020"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/media\/2018"}],"wp:attachment":[{"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/media?parent=2014"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/categories?post=2014"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/tags?post=2014"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}