{"id":17693,"date":"2023-04-05T14:00:00","date_gmt":"2023-04-05T08:30:00","guid":{"rendered":"https:\/\/www.interviewbit.com\/blog\/?post_type=web-story&#038;p=17693"},"modified":"2023-04-04T17:14:51","modified_gmt":"2023-04-04T11:44:51","slug":"steps-to-solve-any-dynamic-programming-interview-question","status":"publish","type":"web-story","link":"https:\/\/www.interviewbit.com\/blog\/web-stories\/steps-to-solve-any-dynamic-programming-interview-question\/","title":{"rendered":"Steps to solve any Dynamic Programming Interview Question"},"content":{"rendered":"<p><html amp=\"\" lang=\"en\"><head><meta charSet=\"utf-8\"\/><meta name=\"viewport\" content=\"width=device-width,minimum-scale=1,initial-scale=1\"\/><script async=\"\" src=\"https:\/\/cdn.ampproject.org\/v0.js\"><\/script><script async=\"\" src=\"https:\/\/cdn.ampproject.org\/v0\/amp-story-1.0.js\" custom-element=\"amp-story\"><\/script><link href=\"https:\/\/fonts.googleapis.com\/css2?display=swap&amp;family=Anton&amp;family=Roboto%3Awght%40400%3B700&amp;family=Darker+Grotesque%3Awght%40400%3B700&amp;family=Poppins%3Awght%40700\" rel=\"stylesheet\"\/><link href=\"https:\/\/images.unsplash.com\/photo-1534972195531-d756b9bfa9f2?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzMHx8aHRtbHxlbnwwfHx8fDE2NzQwNTA3OTQ&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=6000&amp;h=4000&amp;fit=max\" rel=\"preload\" as=\"image\"\/>\n<style amp-boilerplate=\"\">body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}<\/style>\n<p><noscript><\/p>\n<style amp-boilerplate=\"\">body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}<\/style>\n<p><\/noscript><\/p>\n<style amp-custom=\"\">\n              h1, h2, h3 { font-weight: normal; }<\/p>\n<p>              amp-story-page {\n                background-color: #131516;\n              }<\/p>\n<p>              amp-story-grid-layer {\n                overflow: visible;\n              }<\/p>\n<p>              @media (max-aspect-ratio: 9 \/ 16)  {\n                @media (min-aspect-ratio: 320 \/ 678) {\n                  amp-story-grid-layer.grid-layer {\n                    margin-top: calc((100% \/ 0.5625 - 100% \/ 0.6666666666666666) \/ 2);\n                  }\n                }\n              }<\/p>\n<p>              @media not all and (min-resolution:.001dpcm) {\n                @media {\n                  p.text-wrapper > span {\n                    font-size: calc(100% - 0.5px);\n                  }\n                }\n              }<\/p>\n<p>              .page-fullbleed-area,\n              .page-background-overlay-area {\n                position: absolute;\n                overflow: hidden;\n                width: 100%;\n                left: 0;\n                height: calc(1.1851851851851851 * 100%);\n                top: calc((1 - 1.1851851851851851) * 100% \/ 2);\n              }<\/p>\n<p>              .element-overlay-area {\n                position: absolute;\n                width: 100%;\n                height: 100%;\n                top: 0;\n                left: 0;\n              }<\/p>\n<p>              .page-safe-area {\n                overflow: visible;\n                position: absolute;\n                top: 0;\n                bottom: 0;\n                left: 0;\n                right: 0;\n                width: 100%;\n                height: calc(0.84375 * 100%);\n                margin: auto 0;\n              }<\/p>\n<p>              .mask {\n                position: absolute;\n                overflow: hidden;\n              }<\/p>\n<p>              .fill {\n                position: absolute;\n                top: 0;\n                left: 0;\n                right: 0;\n                bottom: 0;\n                margin: 0;\n              }<\/p>\n<p>              @media (prefers-reduced-motion: no-preference) {\n                .animation-wrapper {\n                  opacity: var(--initial-opacity);\n                  transform: var(--initial-transform);\n                }\n              }<\/p>\n<p>              amp-story-grid-layer.align-bottom {\n                align-content: end;\n                padding: 0;\n              }<\/p>\n<p>              .captions-area {\n                padding: 0 32px 0;\n              }<\/p>\n<p>              amp-story-captions {\n                margin-bottom: 16px;\n                text-align: center;\n              }<\/p>\n<p>              amp-story-captions span {\n                display: inline-block;\n                margin: 0;\n                padding: 6px 12px;\n                vertical-align: middle;\n                border-radius: 15px;\n                background: rgba(11, 11, 11, 0.6);\n                color: rgba(255, 255, 255, 1);\n                font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Oxygen-Sans, Ubuntu, Cantarell, \"Helvetica Neue\", sans-serif;;\n                font-size: calc(4 * var(--story-page-vw));\n                line-height: 1.4;\n                word-break: break-word;\n                word-wrap: break-word;\n                overflow-wrap: break-word;\n              }\n              <\/style>\n<p><meta name=\"web-stories-replace-head-start\"\/><title>Steps to solve any Dynamic Programming Interview Question<\/title><link rel=\"canonical\" href=\"https:\/\/www.interviewbit.com\/blog\/?post_type=web-story&amp;p=17693\"\/><meta name=\"web-stories-replace-head-end\"\/><\/head><body><amp-story standalone=\"\" publisher=\"InterviewBit\" publisher-logo-src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/cropped-tumblr-logo.png\" title=\"Steps to solve any Dynamic Programming Interview Question\" poster-portrait-src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/04\/cropped-Follow-these-steps-to-solve-any-Dynamic-Programming-interview-problem.png\"><amp-story-page id=\"e8de3bd0-50f1-44e6-a934-453d1980d163\" auto-advance-after=\"7s\"><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-47995795-a86b-4991-b877-3fa9279ea01f\",\"keyframes\":{\"opacity\":[0,1]},\"delay\":0,\"duration\":600,\"easing\":\"cubic-bezier(0.2, 0.6, 0.0, 1)\",\"fill\":\"both\"}]<\/script><\/amp-story-animation><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-4d73d344-66d4-4624-9472-320761eeea1f\",\"keyframes\":{\"transform\":[\"translate3d(0px, -516.40213%, 0)\",\"translate3d(0px, 0px, 0)\"]},\"delay\":0,\"duration\":600,\"easing\":\"cubic-bezier(0.2, 0.6, 0.0, 1)\",\"fill\":\"both\"}]<\/script><\/amp-story-animation><amp-story-grid-layer template=\"vertical\" aspect-ratio=\"412:618\" class=\"grid-layer\"><\/p>\n<div class=\"page-fullbleed-area\" style=\"background-color:#262626\">\n<div class=\"page-safe-area\">\n<div style=\"position:absolute;pointer-events:none;left:0;top:-9.25926%;width:100%;height:118.51852%;opacity:1\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0\" class=\"mask\" id=\"el-45e19ae5-1b9f-44b5-a5b5-36662dd08397\">\n<div style=\"position:absolute;width:266.66667%;height:100%;left:-83.33334%;top:0%\" data-leaf-element=\"true\"><amp-img layout=\"fill\" src=\"https:\/\/images.unsplash.com\/photo-1534972195531-d756b9bfa9f2?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzMHx8aHRtbHxlbnwwfHx8fDE2NzQwNTA3OTQ&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=6000&amp;h=4000&amp;fit=max\" alt=\"two black flat screen computer monitors\" srcSet=\"https:\/\/images.unsplash.com\/photo-1534972195531-d756b9bfa9f2?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzMHx8aHRtbHxlbnwwfHx8fDE2NzQwNTA3OTQ&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=6000&amp;h=4000&amp;fit=max 6000w,https:\/\/images.unsplash.com\/photo-1534972195531-d756b9bfa9f2?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzMHx8aHRtbHxlbnwwfHx8fDE2NzQwNTA3OTQ&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=4800&amp;h=3200&amp;fit=max 4800w,https:\/\/images.unsplash.com\/photo-1534972195531-d756b9bfa9f2?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzMHx8aHRtbHxlbnwwfHx8fDE2NzQwNTA3OTQ&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=3600&amp;h=2400&amp;fit=max 3600w,https:\/\/images.unsplash.com\/photo-1534972195531-d756b9bfa9f2?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzMHx8aHRtbHxlbnwwfHx8fDE2NzQwNTA3OTQ&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=2400&amp;h=1600&amp;fit=max 2400w,https:\/\/images.unsplash.com\/photo-1534972195531-d756b9bfa9f2?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzMHx8aHRtbHxlbnwwfHx8fDE2NzQwNTA3OTQ&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=1200&amp;h=800&amp;fit=max 1200w,https:\/\/images.unsplash.com\/photo-1534972195531-d756b9bfa9f2?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzMHx8aHRtbHxlbnwwfHx8fDE2NzQwNTA3OTQ&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=340&amp;h=227&amp;fit=max 340w\" sizes=\"(min-width: 1024px) 120vh, 267vw\" disable-inline-width=\"true\"><\/amp-img><\/div>\n<div class=\"element-overlay-area\" style=\"background-color:rgba(0,0,0,0.5)\"><\/div>\n<\/div>\n<\/div>\n<div class=\"page-background-overlay-area\" style=\"background-color:rgba(0,0,0,0.5)\"><\/div>\n<\/div>\n<\/div>\n<p><\/amp-story-grid-layer><amp-story-grid-layer template=\"vertical\" aspect-ratio=\"412:618\" class=\"grid-layer\"><\/p>\n<div class=\"page-fullbleed-area\">\n<div class=\"page-safe-area\">\n<div style=\"position:absolute;pointer-events:none;left:2.6699%;top:61.48867%;width:90.29126%;height:16.99029%;opacity:1\">\n<div id=\"anim-47995795-a86b-4991-b877-3fa9279ea01f\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0;--initial-opacity:0;--initial-transform:none\">\n<div id=\"anim-4d73d344-66d4-4624-9472-320761eeea1f\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0;--initial-opacity:1;--initial-transform:translate3d(0px, -516.40213%, 0)\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0;border-radius:0.5376344086021506% 0.5376344086021506% 0.5376344086021506% 0.5376344086021506% \/ 1.9047619047619049% 1.9047619047619049% 1.9047619047619049% 1.9047619047619049%\" id=\"el-700653a1-7c6f-4229-9a9d-40d583cd443c\">\n<p class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:0.02526724210349462% 0;font-family:&quot;Anton&quot;,sans-serif;font-size:0.566343em;line-height:1.5;text-align:left;padding:0;color:#000000\"><span><span style=\"color: #fff\">Follow&nbsp;these steps&nbsp;to solve&nbsp;any<\/span><\/span><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div style=\"position:absolute;pointer-events:none;left:-0.72816%;top:-6.47249%;width:43.68932%;height:9.70874%;opacity:1\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0\" class=\"mask\" id=\"el-cb48c127-3fe1-4225-9f7c-cff7090fd555\">\n<div style=\"position:absolute;width:100.28251%;height:100%;left:-0.14125%;top:0%\" data-leaf-element=\"true\"><amp-img layout=\"fill\" src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2.png\" alt=\"InterviewBit-White-2\" srcSet=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2.png 2130w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-2048x681.png 2048w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-1536x511.png 1536w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-1024x340.png 1024w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-768x255.png 768w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-300x100.png 300w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-150x50.png 150w\" sizes=\"(min-width: 1024px) 20vh, 44vw\" disable-inline-width=\"true\"><\/amp-img><\/div>\n<\/div>\n<\/div>\n<div style=\"position:absolute;pointer-events:none;left:2.6699%;top:67.31392%;width:92.71845%;height:31.5534%;opacity:1\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0;border-radius:0.5235602094240838% 0.5235602094240838% 0.5235602094240838% 0.5235602094240838% \/ 1.0256410256410255% 1.0256410256410255% 1.0256410256410255% 1.0256410256410255%\" id=\"el-1b8f9b5c-1a18-4ce1-9c5f-06d030451937\">\n<h1 id=\"dynamic-programming-interview-problem\" class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:1.9985019224476441% 0;font-family:&quot;Anton&quot;,sans-serif;font-size:0.809061em;line-height:1.2;text-align:left;padding:0;color:#000000\"><span><span style=\"color: #347eff\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dynamic Programming Interview Problem<\/span><\/span><\/h1>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p><\/amp-story-grid-layer><\/amp-story-page><amp-story-page id=\"8c6bf4ec-2231-4205-afc1-feff529ae9f3\" auto-advance-after=\"7s\"><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-c22f5b3f-36fd-4e0a-b0a7-90f0a96ec053 [data-leaf-element=\\\"true\\\"]\",\"keyframes\":{\"transform\":[\"translate3d(7.8337101513764065%, 0, 0) translate(25%, 0%) scale(1.5)\",\"translate3d(0%, 0, 0) translate(0%, 0%) scale(1)\"]},\"delay\":0,\"duration\":2000,\"fill\":\"forwards\"}]<\/script><\/amp-story-animation><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-e3b2fafa-fc14-4cfd-8a23-18f64da5b0f5\",\"keyframes\":{\"opacity\":[0,1]},\"delay\":0,\"duration\":600,\"easing\":\"cubic-bezier(0.2, 0.6, 0.0, 1)\",\"fill\":\"both\"}]<\/script><\/amp-story-animation><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-49e4bbec-e6b4-45bc-a682-fe268a0c4a70\",\"keyframes\":{\"transform\":[\"translate3d(0px, -324.84395%, 0)\",\"translate3d(0px, 0px, 0)\"]},\"delay\":0,\"duration\":600,\"easing\":\"cubic-bezier(0.2, 0.6, 0.0, 1)\",\"fill\":\"both\"}]<\/script><\/amp-story-animation><amp-story-grid-layer template=\"vertical\" aspect-ratio=\"412:618\" class=\"grid-layer\"><\/p>\n<div class=\"page-fullbleed-area\" style=\"background-color:#c0c0c0\">\n<div class=\"page-safe-area\">\n<div style=\"position:absolute;pointer-events:none;left:0;top:-9.25926%;width:100%;height:118.51852%;opacity:1\">\n<div id=\"anim-c22f5b3f-36fd-4e0a-b0a7-90f0a96ec053\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0\" class=\"mask\" id=\"el-1189e1b6-be4f-4d45-b46f-5e1b0a59a486\">\n<div style=\"position:absolute;width:118.57814%;height:100%;left:-9.28907%;top:0%\" data-leaf-element=\"true\"><amp-img layout=\"fill\" src=\"https:\/\/images.unsplash.com\/photo-1521737711867-e3b97375f902?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxNHx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY3MzY4NzQwNg&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=5304&amp;h=7952&amp;fit=max\" alt=\"men sitting in front of their laptop computer\" srcSet=\"https:\/\/images.unsplash.com\/photo-1521737711867-e3b97375f902?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxNHx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY3MzY4NzQwNg&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=5304&amp;h=7952&amp;fit=max 5304w,https:\/\/images.unsplash.com\/photo-1521737711867-e3b97375f902?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxNHx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY3MzY4NzQwNg&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=4243&amp;h=6361&amp;fit=max 4243w,https:\/\/images.unsplash.com\/photo-1521737711867-e3b97375f902?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxNHx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY3MzY4NzQwNg&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=3182&amp;h=4771&amp;fit=max 3182w,https:\/\/images.unsplash.com\/photo-1521737711867-e3b97375f902?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxNHx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY3MzY4NzQwNg&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=2121&amp;h=3180&amp;fit=max 2121w,https:\/\/images.unsplash.com\/photo-1521737711867-e3b97375f902?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxNHx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY3MzY4NzQwNg&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=1060&amp;h=1589&amp;fit=max 1060w,https:\/\/images.unsplash.com\/photo-1521737711867-e3b97375f902?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxNHx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY3MzY4NzQwNg&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=340&amp;h=510&amp;fit=max 340w\" sizes=\"(min-width: 1024px) 53vh, 119vw\" disable-inline-width=\"true\"><\/amp-img><\/div>\n<div class=\"element-overlay-area\" style=\"background-color:rgba(0,0,0,0.5)\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"page-background-overlay-area\" style=\"background-color:rgba(0,0,0,0.5)\"><\/div>\n<\/div>\n<\/div>\n<p><\/amp-story-grid-layer><amp-story-grid-layer template=\"vertical\" aspect-ratio=\"412:618\" class=\"grid-layer\"><\/p>\n<div class=\"page-fullbleed-area\">\n<div class=\"page-safe-area\">\n<div style=\"position:absolute;pointer-events:none;left:-16.01942%;top:53.07443%;width:139.56311%;height:36.08414%;opacity:1\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0\" class=\"mask\" id=\"el-a881fc6a-7d42-46fe-89c7-57804b528a23\">\n<div class=\"fill\" style=\"background-color:rgba(18,99,255,0.5);will-change:transform\"><\/div>\n<\/div>\n<\/div>\n<div style=\"position:absolute;pointer-events:none;left:-0.72816%;top:-6.47249%;width:43.68932%;height:9.70874%;opacity:1\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0\" class=\"mask\" id=\"el-81811408-af93-46a4-9620-651285eea9d8\">\n<div style=\"position:absolute;width:100.28251%;height:100%;left:-0.14125%;top:0%\" data-leaf-element=\"true\"><amp-img layout=\"fill\" src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2.png\" alt=\"InterviewBit-White-2\" srcSet=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2.png 2130w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-2048x681.png 2048w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-1536x511.png 1536w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-1024x340.png 1024w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-768x255.png 768w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-300x100.png 300w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-150x50.png 150w\" sizes=\"(min-width: 1024px) 20vh, 44vw\" disable-inline-width=\"true\"><\/amp-img><\/div>\n<\/div>\n<\/div>\n<div style=\"position:absolute;pointer-events:none;left:0.72816%;top:91.10032%;width:98.05825%;height:3.72168%;opacity:1\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0;border-radius:0.49504950495049505% 0.49504950495049505% 0.49504950495049505% 0.49504950495049505% \/ 8.695652173913043% 8.695652173913043% 8.695652173913043% 8.695652173913043%\" id=\"el-54daed4f-c8c4-4719-9942-2809033db776\">\n<p class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:-0.06961633663366336% 0;font-family:&quot;Roboto&quot;,sans-serif;font-size:0.323625em;line-height:1.2;text-align:center;padding:0;color:#000000\"><span><span style=\"font-weight: 700; color: #fff\">Ready to crack DP interviews with ease?<\/span><\/span><\/p>\n<\/div>\n<\/div>\n<div style=\"position:absolute;pointer-events:none;left:7.03883%;top:55.50162%;width:85.92233%;height:28.80259%;opacity:1\">\n<div id=\"anim-e3b2fafa-fc14-4cfd-8a23-18f64da5b0f5\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0;--initial-opacity:0;--initial-transform:none\">\n<div id=\"anim-49e4bbec-e6b4-45bc-a682-fe268a0c4a70\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0;--initial-opacity:1;--initial-transform:translate3d(0px, -324.84395%, 0)\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0;border-radius:0.5649717514124294% 0.5649717514124294% 0.5649717514124294% 0.5649717514124294% \/ 1.1235955056179776% 1.1235955056179776% 1.1235955056179776% 1.1235955056179776%\" id=\"el-cfca1c02-e711-4541-8f4f-1ccbec4bcde6\">\n<p class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:1.4079096045197745% 0;font-family:&quot;Darker Grotesque&quot;,sans-serif;font-size:0.453074em;line-height:1;text-align:initial;padding:0;color:#000000\"><span><span style=\"color: #fff\">DP is an essential topic for coding interviews, &amp; mastering it can take your career to new heights. Are you struggling with DP interview questions?&nbsp;Let&#8217;s explpre how to solve the DP problem -&gt;<\/span><\/span><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div style=\"position:absolute;pointer-events:none;left:6.5534%;top:39.32039%;width:86.16505%;height:11.48867%;opacity:1\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0;border-radius:0.5633802816901409% 0.5633802816901409% 0.5633802816901409% 0.5633802816901409% \/ 2.8169014084507045% 2.8169014084507045% 2.8169014084507045% 2.8169014084507045%\" id=\"el-b7ad6fc6-7f2c-436e-8356-cd324d012573\">\n<h2 id=\"introduction-to-dynamic-programming\" class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:-0.11883802816901408% 0;font-family:&quot;Roboto&quot;,sans-serif;font-size:0.485437em;line-height:1.2;text-align:left;padding:0;color:#000000\"><span><span style=\"font-weight: 700; color: #fff\">Introduction to Dynamic Programming<\/span><\/span><\/h2>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p><\/amp-story-grid-layer><amp-story-page-outlink layout=\"nodisplay\" cta-image=\"https:\/\/assets.interviewbit.com\/assets\/ib-logo-904db47f8d2208f21a168bfe4851e0fdcc041f2487b6a8ec0b181d3724dbd012.png.gz\"><a href=\"https:\/\/www.interviewbit.com\/courses\/programming\/dynamic-programming\/?utm_source=ib&amp;utm_medium=webstories&amp;utm_campaign=how-to-solve-any-dynamic-programming-interview-question\" rel=\"\">Explore now<\/a><\/amp-story-page-outlink><\/amp-story-page><amp-story-page id=\"40e238c0-cd08-4923-bd94-e7fbdf785fcb\" auto-advance-after=\"7s\"><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-2c6b6108-fe10-4f3e-8d1e-5a0ceb344186\",\"keyframes\":{\"opacity\":[0,1]},\"delay\":0,\"duration\":600,\"easing\":\"cubic-bezier(0.2, 0.6, 0.0, 1)\",\"fill\":\"both\"}]<\/script><\/amp-story-animation><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-267b39e4-2b6b-41ad-a966-59317bf909d0\",\"keyframes\":{\"transform\":[\"translate3d(0px, -242.83001%, 0)\",\"translate3d(0px, 0px, 0)\"]},\"delay\":0,\"duration\":600,\"easing\":\"cubic-bezier(0.2, 0.6, 0.0, 1)\",\"fill\":\"both\"}]<\/script><\/amp-story-animation><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-c64a3e70-963c-4079-a48f-76ca090ef122 [data-leaf-element=\\\"true\\\"]\",\"keyframes\":{\"transform\":[\"translate3d(7.868525640762189%, 0, 0) translate(25%, 0%) scale(1.5)\",\"translate3d(0%, 0, 0) translate(0%, 0%) scale(1)\"]},\"delay\":0,\"duration\":2000,\"fill\":\"forwards\"}]<\/script><\/amp-story-animation><amp-story-grid-layer template=\"vertical\" aspect-ratio=\"412:618\" class=\"grid-layer\"><\/p>\n<div class=\"page-fullbleed-area\" style=\"background-color:#f3f3f3\">\n<div class=\"page-safe-area\">\n<div style=\"position:absolute;pointer-events:none;left:0;top:-9.25926%;width:100%;height:118.51852%;opacity:1\">\n<div id=\"anim-c64a3e70-963c-4079-a48f-76ca090ef122\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0\" class=\"mask\" id=\"el-1189e1b6-be4f-4d45-b46f-5e1b0a59a486\">\n<div style=\"position:absolute;width:118.67612%;height:100%;left:-9.33806%;top:0%\" data-leaf-element=\"true\"><amp-img layout=\"fill\" src=\"https:\/\/images.unsplash.com\/photo-1573495783323-9e59a325d4b4?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw3MHx8ZGV2ZWxvcGVyc3xlbnwwfHx8fDE2NjQ0NjYzNjE&amp;ixlib=rb-1.2.1&amp;fm=jpg&amp;w=4016&amp;h=6016&amp;fit=max\" alt=\"shallow focus photo of woman using MacBook\" srcSet=\"https:\/\/images.unsplash.com\/photo-1573495783323-9e59a325d4b4?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw3MHx8ZGV2ZWxvcGVyc3xlbnwwfHx8fDE2NjQ0NjYzNjE&amp;ixlib=rb-1.2.1&amp;fm=jpg&amp;w=4016&amp;h=6016&amp;fit=max 4016w,https:\/\/images.unsplash.com\/photo-1573495783323-9e59a325d4b4?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw3MHx8ZGV2ZWxvcGVyc3xlbnwwfHx8fDE2NjQ0NjYzNjE&amp;ixlib=rb-1.2.1&amp;fm=jpg&amp;w=3212&amp;h=4812&amp;fit=max 3212w,https:\/\/images.unsplash.com\/photo-1573495783323-9e59a325d4b4?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw3MHx8ZGV2ZWxvcGVyc3xlbnwwfHx8fDE2NjQ0NjYzNjE&amp;ixlib=rb-1.2.1&amp;fm=jpg&amp;w=2409&amp;h=3609&amp;fit=max 2409w,https:\/\/images.unsplash.com\/photo-1573495783323-9e59a325d4b4?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw3MHx8ZGV2ZWxvcGVyc3xlbnwwfHx8fDE2NjQ0NjYzNjE&amp;ixlib=rb-1.2.1&amp;fm=jpg&amp;w=1606&amp;h=2406&amp;fit=max 1606w,https:\/\/images.unsplash.com\/photo-1573495783323-9e59a325d4b4?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw3MHx8ZGV2ZWxvcGVyc3xlbnwwfHx8fDE2NjQ0NjYzNjE&amp;ixlib=rb-1.2.1&amp;fm=jpg&amp;w=803&amp;h=1203&amp;fit=max 803w,https:\/\/images.unsplash.com\/photo-1573495783323-9e59a325d4b4?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw3MHx8ZGV2ZWxvcGVyc3xlbnwwfHx8fDE2NjQ0NjYzNjE&amp;ixlib=rb-1.2.1&amp;fm=jpg&amp;w=340&amp;h=509&amp;fit=max 340w\" sizes=\"(min-width: 1024px) 53vh, 119vw\" disable-inline-width=\"true\"><\/amp-img><\/div>\n<div class=\"element-overlay-area\" style=\"background-color:rgba(0,0,0,0.5)\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"page-background-overlay-area\" style=\"background-color:rgba(0,0,0,0.5)\"><\/div>\n<\/div>\n<\/div>\n<p><\/amp-story-grid-layer><amp-story-grid-layer template=\"vertical\" aspect-ratio=\"412:618\" class=\"grid-layer\"><\/p>\n<div class=\"page-fullbleed-area\">\n<div class=\"page-safe-area\">\n<div style=\"position:absolute;pointer-events:none;left:-16.01942%;top:53.07443%;width:139.56311%;height:36.08414%;opacity:1\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0\" class=\"mask\" id=\"el-fab3d0ab-11ec-41b6-95e6-21f14fa79e04\">\n<div class=\"fill\" style=\"background-color:rgba(18,99,255,0.5);will-change:transform\"><\/div>\n<\/div>\n<\/div>\n<div style=\"position:absolute;pointer-events:none;left:-0.72816%;top:-6.47249%;width:43.68932%;height:9.70874%;opacity:1\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0\" class=\"mask\" id=\"el-46d88c1c-7a43-4355-acc1-3a75a4e5a0cc\">\n<div style=\"position:absolute;width:100.28251%;height:100%;left:-0.14125%;top:0%\" data-leaf-element=\"true\"><amp-img layout=\"fill\" src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2.png\" alt=\"InterviewBit-White-2\" srcSet=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2.png 2130w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-2048x681.png 2048w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-1536x511.png 1536w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-1024x340.png 1024w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-768x255.png 768w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-300x100.png 300w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-150x50.png 150w\" sizes=\"(min-width: 1024px) 20vh, 44vw\" disable-inline-width=\"true\"><\/amp-img><\/div>\n<\/div>\n<\/div>\n<div style=\"position:absolute;pointer-events:none;left:7.03883%;top:44.82201%;width:85.92233%;height:37.86408%;opacity:1\">\n<div id=\"anim-2c6b6108-fe10-4f3e-8d1e-5a0ceb344186\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0;--initial-opacity:0;--initial-transform:none\">\n<div id=\"anim-267b39e4-2b6b-41ad-a966-59317bf909d0\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0;--initial-opacity:1;--initial-transform:translate3d(0px, -242.83001%, 0)\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0;border-radius:0.5649717514124294% 0.5649717514124294% 0.5649717514124294% 0.5649717514124294% \/ 0.8547008547008548% 0.8547008547008548% 0.8547008547008548% 0.8547008547008548%\" id=\"el-5bc92ad7-5298-4033-b5ea-f06daf81a5a9\">\n<p class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:1.4079096045197745% 0;font-family:&quot;Darker Grotesque&quot;,sans-serif;font-size:0.453074em;line-height:1;text-align:initial;padding:0;color:#000000\"><span><span style=\"font-weight: 700; color: #fff\">1. Recognize the beast&nbsp;<\/span><\/p>\n<p><span style=\"color: #fff\">DP problems have a distinct pattern. Look for keywords like &#8220;minimum\/maximum&#8221; or &#8220;longest\/shortest.&#8221; Recognizing the problem is the first step toward solving it.<\/span><\/span><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div style=\"position:absolute;pointer-events:none;left:0.72816%;top:91.10032%;width:98.05825%;height:3.72168%;opacity:1\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0;border-radius:0.49504950495049505% 0.49504950495049505% 0.49504950495049505% 0.49504950495049505% \/ 8.695652173913043% 8.695652173913043% 8.695652173913043% 8.695652173913043%\" id=\"el-613d7420-7aa1-4c3f-b550-8763aabc1665\">\n<p class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:-0.06961633663366336% 0;font-family:&quot;Roboto&quot;,sans-serif;font-size:0.323625em;line-height:1.2;text-align:center;padding:0;color:#000000\"><span><span style=\"font-weight: 700; color: #fff\">Ready to crack DP interviews with ease?<\/span><\/span><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p><\/amp-story-grid-layer><amp-story-page-outlink layout=\"nodisplay\" cta-image=\"https:\/\/assets.interviewbit.com\/assets\/ib-logo-904db47f8d2208f21a168bfe4851e0fdcc041f2487b6a8ec0b181d3724dbd012.png.gz\"><a href=\"https:\/\/www.interviewbit.com\/courses\/programming\/dynamic-programming\/?utm_source=ib&amp;utm_medium=webstories&amp;utm_campaign=how-to-solve-any-dynamic-programming-interview-question\" rel=\"\">Explore now<\/a><\/amp-story-page-outlink><\/amp-story-page><amp-story-page id=\"95903fc4-ab54-43ff-8549-b530094a70d1\" auto-advance-after=\"7s\"><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-1401331e-d513-40f2-b68a-b002b7e4897a [data-leaf-element=\\\"true\\\"]\",\"keyframes\":{\"transform\":[\"translate3d(7.812499744007886%, 0, 0) translate(25%, 0%) scale(1.5)\",\"translate3d(0%, 0, 0) translate(0%, 0%) scale(1)\"]},\"delay\":0,\"duration\":2000,\"fill\":\"forwards\"}]<\/script><\/amp-story-animation><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-64810929-24aa-49d6-a063-0e19a9e3f122\",\"keyframes\":{\"opacity\":[0,1]},\"delay\":0,\"duration\":600,\"easing\":\"cubic-bezier(0.2, 0.6, 0.0, 1)\",\"fill\":\"both\"}]<\/script><\/amp-story-animation><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-e4397ba0-c122-446d-b351-14a20cfd113c\",\"keyframes\":{\"transform\":[\"translate3d(0px, -217.26039%, 0)\",\"translate3d(0px, 0px, 0)\"]},\"delay\":0,\"duration\":600,\"easing\":\"cubic-bezier(0.2, 0.6, 0.0, 1)\",\"fill\":\"both\"}]<\/script><\/amp-story-animation><amp-story-grid-layer template=\"vertical\" aspect-ratio=\"412:618\" class=\"grid-layer\"><\/p>\n<div class=\"page-fullbleed-area\" style=\"background-color:#260c0c\">\n<div class=\"page-safe-area\">\n<div style=\"position:absolute;pointer-events:none;left:0;top:-9.25926%;width:100%;height:118.51852%;opacity:1\">\n<div id=\"anim-1401331e-d513-40f2-b68a-b002b7e4897a\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0\" class=\"mask\" id=\"el-6417e2e4-880c-4959-9e6c-834fe69f9dd6\">\n<div style=\"position:absolute;width:118.51852%;height:100%;left:-9.25926%;top:0%\" data-leaf-element=\"true\"><amp-img layout=\"fill\" src=\"https:\/\/images.unsplash.com\/photo-1579226905180-636b76d96082?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxNHx8bWFwJTIwd2l0aCUyMGxhcHRvcHxlbnwwfHx8fDE2NzY5MDYyMTQ&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=4000&amp;h=6000&amp;fit=max\" alt=\"man sitting in front of the MacBook Pro\" srcSet=\"https:\/\/images.unsplash.com\/photo-1579226905180-636b76d96082?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxNHx8bWFwJTIwd2l0aCUyMGxhcHRvcHxlbnwwfHx8fDE2NzY5MDYyMTQ&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=4000&amp;h=6000&amp;fit=max 4000w,https:\/\/images.unsplash.com\/photo-1579226905180-636b76d96082?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxNHx8bWFwJTIwd2l0aCUyMGxhcHRvcHxlbnwwfHx8fDE2NzY5MDYyMTQ&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=3200&amp;h=4800&amp;fit=max 3200w,https:\/\/images.unsplash.com\/photo-1579226905180-636b76d96082?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxNHx8bWFwJTIwd2l0aCUyMGxhcHRvcHxlbnwwfHx8fDE2NzY5MDYyMTQ&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=2400&amp;h=3600&amp;fit=max 2400w,https:\/\/images.unsplash.com\/photo-1579226905180-636b76d96082?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxNHx8bWFwJTIwd2l0aCUyMGxhcHRvcHxlbnwwfHx8fDE2NzY5MDYyMTQ&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=1600&amp;h=2400&amp;fit=max 1600w,https:\/\/images.unsplash.com\/photo-1579226905180-636b76d96082?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxNHx8bWFwJTIwd2l0aCUyMGxhcHRvcHxlbnwwfHx8fDE2NzY5MDYyMTQ&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=800&amp;h=1200&amp;fit=max 800w,https:\/\/images.unsplash.com\/photo-1579226905180-636b76d96082?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxNHx8bWFwJTIwd2l0aCUyMGxhcHRvcHxlbnwwfHx8fDE2NzY5MDYyMTQ&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=340&amp;h=510&amp;fit=max 340w\" sizes=\"(min-width: 1024px) 53vh, 119vw\" disable-inline-width=\"true\"><\/amp-img><\/div>\n<div class=\"element-overlay-area\" style=\"background-color:rgba(0,0,0,0.5)\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"page-background-overlay-area\" style=\"background-color:rgba(0,0,0,0.5)\"><\/div>\n<\/div>\n<\/div>\n<p><\/amp-story-grid-layer><amp-story-grid-layer template=\"vertical\" aspect-ratio=\"412:618\" class=\"grid-layer\"><\/p>\n<div class=\"page-fullbleed-area\">\n<div class=\"page-safe-area\">\n<div style=\"position:absolute;pointer-events:none;left:-16.01942%;top:53.07443%;width:139.56311%;height:36.08414%;opacity:1\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0\" class=\"mask\" id=\"el-59f83619-8945-4050-b9ea-7da34f150cf9\">\n<div class=\"fill\" style=\"background-color:rgba(18,99,255,0.5);will-change:transform\"><\/div>\n<\/div>\n<\/div>\n<div style=\"position:absolute;pointer-events:none;left:-0.72816%;top:-6.47249%;width:43.68932%;height:9.70874%;opacity:1\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0\" class=\"mask\" id=\"el-b5cf3d24-52ce-4d75-9e43-2bd8784e2509\">\n<div style=\"position:absolute;width:100.28251%;height:100%;left:-0.14125%;top:0%\" data-leaf-element=\"true\"><amp-img layout=\"fill\" src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2.png\" alt=\"InterviewBit-White-2\" srcSet=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2.png 2130w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-2048x681.png 2048w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-1536x511.png 1536w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-1024x340.png 1024w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-768x255.png 768w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-300x100.png 300w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-150x50.png 150w\" sizes=\"(min-width: 1024px) 20vh, 44vw\" disable-inline-width=\"true\"><\/amp-img><\/div>\n<\/div>\n<\/div>\n<div style=\"position:absolute;pointer-events:none;left:7.03883%;top:40.45307%;width:85.92233%;height:42.39482%;opacity:1\">\n<div id=\"anim-64810929-24aa-49d6-a063-0e19a9e3f122\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0;--initial-opacity:0;--initial-transform:none\">\n<div id=\"anim-e4397ba0-c122-446d-b351-14a20cfd113c\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0;--initial-opacity:1;--initial-transform:translate3d(0px, -217.26039%, 0)\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0;border-radius:0.5649717514124294% 0.5649717514124294% 0.5649717514124294% 0.5649717514124294% \/ 0.7633587786259541% 0.7633587786259541% 0.7633587786259541% 0.7633587786259541%\" id=\"el-b6c8eb7e-db8d-4473-a088-51c52cf0a2cd\">\n<p class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:1.4079096045197745% 0;font-family:&quot;Darker Grotesque&quot;,sans-serif;font-size:0.453074em;line-height:1;text-align:initial;padding:0;color:#000000\"><span><span style=\"font-weight: 700; color: #fff\">2. Variables, Variables Everywhere<\/span><span style=\"color: #fff\">&nbsp;<\/span><\/p>\n<p><span style=\"color: #fff\">Identify the variables in the problem. They could be anything from indices to the size of the input. Knowing the variables will help you write the recurrence relation.<\/span><\/span><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div style=\"position:absolute;pointer-events:none;left:0.72816%;top:91.10032%;width:98.05825%;height:3.72168%;opacity:1\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0;border-radius:0.49504950495049505% 0.49504950495049505% 0.49504950495049505% 0.49504950495049505% \/ 8.695652173913043% 8.695652173913043% 8.695652173913043% 8.695652173913043%\" id=\"el-adf99b9f-b603-4777-bf85-3180bba0ad39\">\n<p class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:-0.06961633663366336% 0;font-family:&quot;Roboto&quot;,sans-serif;font-size:0.323625em;line-height:1.2;text-align:center;padding:0;color:#000000\"><span><span style=\"font-weight: 700; color: #fff\">Ready to crack DP interviews with ease?<\/span><\/span><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p><\/amp-story-grid-layer><amp-story-page-outlink layout=\"nodisplay\"><a href=\"https:\/\/www.interviewbit.com\/courses\/programming\/dynamic-programming\/?utm_source=ib&amp;utm_medium=webstories&amp;utm_campaign=how-to-solve-any-dynamic-programming-interview-question\" rel=\"\">Explore now<\/a><\/amp-story-page-outlink><\/amp-story-page><amp-story-page id=\"003c04fa-fa9a-41be-99d6-dff01f94a2c3\" auto-advance-after=\"7s\"><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-82c8dad6-2c3e-47e4-b9bd-9e9f35dae10e [data-leaf-element=\\\"true\\\"]\",\"keyframes\":{\"transform\":[\"translate3d(7.8337101513764065%, 0, 0) translate(25%, 0%) scale(1.5)\",\"translate3d(0%, 0, 0) translate(0%, 0%) scale(1)\"]},\"delay\":0,\"duration\":2000,\"fill\":\"forwards\"}]<\/script><\/amp-story-animation><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-4f76b36b-b2c0-4d76-8714-38cc70384ea7\",\"keyframes\":{\"opacity\":[0,1]},\"delay\":0,\"duration\":600,\"easing\":\"cubic-bezier(0.2, 0.6, 0.0, 1)\",\"fill\":\"both\"}]<\/script><\/amp-story-animation><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-fb449d73-beb9-44a7-96c7-f725a35ea91c\",\"keyframes\":{\"transform\":[\"translate3d(0px, -262.24383%, 0)\",\"translate3d(0px, 0px, 0)\"]},\"delay\":0,\"duration\":600,\"easing\":\"cubic-bezier(0.2, 0.6, 0.0, 1)\",\"fill\":\"both\"}]<\/script><\/amp-story-animation><amp-story-grid-layer template=\"vertical\" aspect-ratio=\"412:618\" class=\"grid-layer\"><\/p>\n<div class=\"page-fullbleed-area\" style=\"background-color:#f3d9d9\">\n<div class=\"page-safe-area\">\n<div style=\"position:absolute;pointer-events:none;left:0;top:-9.25926%;width:100%;height:118.51852%;opacity:1\">\n<div id=\"anim-82c8dad6-2c3e-47e4-b9bd-9e9f35dae10e\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0\" class=\"mask\" id=\"el-741b80be-f1e4-4e7e-81a1-3f452436e27f\">\n<div style=\"position:absolute;width:118.57814%;height:100%;left:-9.28907%;top:0%\" data-leaf-element=\"true\"><amp-img layout=\"fill\" src=\"https:\/\/images.unsplash.com\/photo-1581087724844-037b13e16b0b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw5Nnx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjc2MDUxOTAz&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=6630&amp;h=9940&amp;fit=max\" alt=\"woman in black shirt using computer\" srcSet=\"https:\/\/images.unsplash.com\/photo-1581087724844-037b13e16b0b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw5Nnx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjc2MDUxOTAz&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=6630&amp;h=9940&amp;fit=max 6630w,https:\/\/images.unsplash.com\/photo-1581087724844-037b13e16b0b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw5Nnx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjc2MDUxOTAz&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=5304&amp;h=7952&amp;fit=max 5304w,https:\/\/images.unsplash.com\/photo-1581087724844-037b13e16b0b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw5Nnx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjc2MDUxOTAz&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=3978&amp;h=5964&amp;fit=max 3978w,https:\/\/images.unsplash.com\/photo-1581087724844-037b13e16b0b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw5Nnx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjc2MDUxOTAz&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=2652&amp;h=3976&amp;fit=max 2652w,https:\/\/images.unsplash.com\/photo-1581087724844-037b13e16b0b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw5Nnx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjc2MDUxOTAz&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=1326&amp;h=1988&amp;fit=max 1326w,https:\/\/images.unsplash.com\/photo-1581087724844-037b13e16b0b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw5Nnx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjc2MDUxOTAz&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=340&amp;h=510&amp;fit=max 340w\" sizes=\"(min-width: 1024px) 53vh, 119vw\" disable-inline-width=\"true\"><\/amp-img><\/div>\n<div class=\"element-overlay-area\" style=\"background-color:rgba(0,0,0,0.5)\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"page-background-overlay-area\" style=\"background-color:rgba(0,0,0,0.5)\"><\/div>\n<\/div>\n<\/div>\n<p><\/amp-story-grid-layer><amp-story-grid-layer template=\"vertical\" aspect-ratio=\"412:618\" class=\"grid-layer\"><\/p>\n<div class=\"page-fullbleed-area\">\n<div class=\"page-safe-area\">\n<div style=\"position:absolute;pointer-events:none;left:-16.01942%;top:53.07443%;width:139.56311%;height:36.08414%;opacity:1\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0\" class=\"mask\" id=\"el-27e02540-31d4-4d48-b516-d77a39796e88\">\n<div class=\"fill\" style=\"background-color:rgba(18,99,255,0.5);will-change:transform\"><\/div>\n<\/div>\n<\/div>\n<div style=\"position:absolute;pointer-events:none;left:-0.72816%;top:-6.47249%;width:43.68932%;height:9.70874%;opacity:1\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0\" class=\"mask\" id=\"el-5e87eb52-4c7b-48b0-87a5-6a9f21443327\">\n<div style=\"position:absolute;width:100.28251%;height:100%;left:-0.14125%;top:0%\" data-leaf-element=\"true\"><amp-img layout=\"fill\" src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2.png\" alt=\"InterviewBit-White-2\" srcSet=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2.png 2130w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-2048x681.png 2048w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-1536x511.png 1536w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-1024x340.png 1024w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-768x255.png 768w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-300x100.png 300w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-150x50.png 150w\" sizes=\"(min-width: 1024px) 20vh, 44vw\" disable-inline-width=\"true\"><\/amp-img><\/div>\n<\/div>\n<\/div>\n<div style=\"position:absolute;pointer-events:none;left:7.03883%;top:44.82201%;width:85.92233%;height:33.33333%;opacity:1\">\n<div id=\"anim-4f76b36b-b2c0-4d76-8714-38cc70384ea7\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0;--initial-opacity:0;--initial-transform:none\">\n<div id=\"anim-fb449d73-beb9-44a7-96c7-f725a35ea91c\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0;--initial-opacity:1;--initial-transform:translate3d(0px, -262.24383%, 0)\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0;border-radius:0.5649717514124294% 0.5649717514124294% 0.5649717514124294% 0.5649717514124294% \/ 0.9708737864077669% 0.9708737864077669% 0.9708737864077669% 0.9708737864077669%\" id=\"el-ce3c9b52-805a-4ef4-8d9a-7e1120dfc4b3\">\n<p class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:1.4079096045197745% 0;font-family:&quot;Darker Grotesque&quot;,sans-serif;font-size:0.453074em;line-height:1;text-align:initial;padding:0;color:#000000\"><span><span style=\"font-weight: 700; color: #fff\">3. Express yourself&nbsp;<\/span><\/p>\n<p><span style=\"color: #fff\">Write a clear and concise recurrence relation. Use the variables you identified to express the problem in a mathematical equation.<\/span><\/span><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div style=\"position:absolute;pointer-events:none;left:0.72816%;top:91.10032%;width:98.05825%;height:3.72168%;opacity:1\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0;border-radius:0.49504950495049505% 0.49504950495049505% 0.49504950495049505% 0.49504950495049505% \/ 8.695652173913043% 8.695652173913043% 8.695652173913043% 8.695652173913043%\" id=\"el-4476fa7c-06b4-4835-8abe-2d38aa71fa28\">\n<p class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:-0.06961633663366336% 0;font-family:&quot;Roboto&quot;,sans-serif;font-size:0.323625em;line-height:1.2;text-align:center;padding:0;color:#000000\"><span><span style=\"font-weight: 700; color: #fff\">Ready to crack DP interviews with ease?<\/span><\/span><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p><\/amp-story-grid-layer><amp-story-page-outlink layout=\"nodisplay\" cta-image=\"https:\/\/assets.interviewbit.com\/assets\/ib-logo-904db47f8d2208f21a168bfe4851e0fdcc041f2487b6a8ec0b181d3724dbd012.png.gz\"><a href=\"https:\/\/www.interviewbit.com\/courses\/programming\/dynamic-programming\/?utm_source=ib&amp;utm_medium=webstories&amp;utm_campaign=how-to-solve-any-dynamic-programming-interview-question\" rel=\"\">Explore now<\/a><\/amp-story-page-outlink><\/amp-story-page><amp-story-page id=\"e527486a-774a-4c1c-b1b0-bc90e6a54bf1\" auto-advance-after=\"7s\"><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-ad2d19b4-bd2f-4503-af4c-ff929b0a75ba [data-leaf-element=\\\"true\\\"]\",\"keyframes\":{\"transform\":[\"translate3d(7.812499744007886%, 0, 0) translate(25%, 0%) scale(1.5)\",\"translate3d(0%, 0, 0) translate(0%, 0%) scale(1)\"]},\"delay\":0,\"duration\":2000,\"fill\":\"forwards\"}]<\/script><\/amp-story-animation><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-e2a1e769-f766-495f-a04a-334880cb7b9f\",\"keyframes\":{\"opacity\":[0,1]},\"delay\":0,\"duration\":600,\"easing\":\"cubic-bezier(0.2, 0.6, 0.0, 1)\",\"fill\":\"both\"}]<\/script><\/amp-story-animation><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-e760b547-3871-4648-bae8-147ae830fe79\",\"keyframes\":{\"transform\":[\"translate3d(0px, -287.7653%, 0)\",\"translate3d(0px, 0px, 0)\"]},\"delay\":0,\"duration\":600,\"easing\":\"cubic-bezier(0.2, 0.6, 0.0, 1)\",\"fill\":\"both\"}]<\/script><\/amp-story-animation><amp-story-grid-layer template=\"vertical\" aspect-ratio=\"412:618\" class=\"grid-layer\"><\/p>\n<div class=\"page-fullbleed-area\" style=\"background-color:#f3f3f3\">\n<div class=\"page-safe-area\">\n<div style=\"position:absolute;pointer-events:none;left:0;top:-9.25926%;width:100%;height:118.51852%;opacity:1\">\n<div id=\"anim-ad2d19b4-bd2f-4503-af4c-ff929b0a75ba\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0\" class=\"mask\" id=\"el-6417e2e4-880c-4959-9e6c-834fe69f9dd6\">\n<div style=\"position:absolute;width:118.51852%;height:100%;left:-9.25926%;top:0%\" data-leaf-element=\"true\"><amp-img layout=\"fill\" src=\"https:\/\/images.unsplash.com\/flagged\/photo-1563536310477-c7b4e3a800c2?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw1N3x8ZGV2ZWxvcGVyc3xlbnwwfHx8fDE2NjQ0NjYzMzM&amp;ixlib=rb-1.2.1&amp;fm=jpg&amp;w=4000&amp;h=6000&amp;fit=max\" alt=\"woman leaning at the table\" srcSet=\"https:\/\/images.unsplash.com\/flagged\/photo-1563536310477-c7b4e3a800c2?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw1N3x8ZGV2ZWxvcGVyc3xlbnwwfHx8fDE2NjQ0NjYzMzM&amp;ixlib=rb-1.2.1&amp;fm=jpg&amp;w=4000&amp;h=6000&amp;fit=max 4000w,https:\/\/images.unsplash.com\/flagged\/photo-1563536310477-c7b4e3a800c2?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw1N3x8ZGV2ZWxvcGVyc3xlbnwwfHx8fDE2NjQ0NjYzMzM&amp;ixlib=rb-1.2.1&amp;fm=jpg&amp;w=3200&amp;h=4800&amp;fit=max 3200w,https:\/\/images.unsplash.com\/flagged\/photo-1563536310477-c7b4e3a800c2?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw1N3x8ZGV2ZWxvcGVyc3xlbnwwfHx8fDE2NjQ0NjYzMzM&amp;ixlib=rb-1.2.1&amp;fm=jpg&amp;w=2400&amp;h=3600&amp;fit=max 2400w,https:\/\/images.unsplash.com\/flagged\/photo-1563536310477-c7b4e3a800c2?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw1N3x8ZGV2ZWxvcGVyc3xlbnwwfHx8fDE2NjQ0NjYzMzM&amp;ixlib=rb-1.2.1&amp;fm=jpg&amp;w=1600&amp;h=2400&amp;fit=max 1600w,https:\/\/images.unsplash.com\/flagged\/photo-1563536310477-c7b4e3a800c2?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw1N3x8ZGV2ZWxvcGVyc3xlbnwwfHx8fDE2NjQ0NjYzMzM&amp;ixlib=rb-1.2.1&amp;fm=jpg&amp;w=800&amp;h=1200&amp;fit=max 800w,https:\/\/images.unsplash.com\/flagged\/photo-1563536310477-c7b4e3a800c2?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw1N3x8ZGV2ZWxvcGVyc3xlbnwwfHx8fDE2NjQ0NjYzMzM&amp;ixlib=rb-1.2.1&amp;fm=jpg&amp;w=340&amp;h=510&amp;fit=max 340w\" sizes=\"(min-width: 1024px) 53vh, 119vw\" disable-inline-width=\"true\"><\/amp-img><\/div>\n<div class=\"element-overlay-area\" style=\"background-color:rgba(0,0,0,0.5)\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"page-background-overlay-area\" style=\"background-color:rgba(0,0,0,0.5)\"><\/div>\n<\/div>\n<\/div>\n<p><\/amp-story-grid-layer><amp-story-grid-layer template=\"vertical\" aspect-ratio=\"412:618\" class=\"grid-layer\"><\/p>\n<div class=\"page-fullbleed-area\">\n<div class=\"page-safe-area\">\n<div style=\"position:absolute;pointer-events:none;left:-16.01942%;top:53.07443%;width:139.56311%;height:36.08414%;opacity:1\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0\" class=\"mask\" id=\"el-4d33a88b-035f-42ee-b31a-067de89d0aea\">\n<div class=\"fill\" style=\"background-color:rgba(18,99,255,0.5);will-change:transform\"><\/div>\n<\/div>\n<\/div>\n<div style=\"position:absolute;pointer-events:none;left:-0.72816%;top:-6.47249%;width:43.68932%;height:9.70874%;opacity:1\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0\" class=\"mask\" id=\"el-78fac6be-aadb-4543-8fc0-853d074437f3\">\n<div style=\"position:absolute;width:100.28251%;height:100%;left:-0.14125%;top:0%\" data-leaf-element=\"true\"><amp-img layout=\"fill\" src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2.png\" alt=\"InterviewBit-White-2\" srcSet=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2.png 2130w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-2048x681.png 2048w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-1536x511.png 1536w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-1024x340.png 1024w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-768x255.png 768w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-300x100.png 300w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-150x50.png 150w\" sizes=\"(min-width: 1024px) 20vh, 44vw\" disable-inline-width=\"true\"><\/amp-img><\/div>\n<\/div>\n<\/div>\n<div style=\"position:absolute;pointer-events:none;left:7.03883%;top:44.82201%;width:85.92233%;height:28.80259%;opacity:1\">\n<div id=\"anim-e2a1e769-f766-495f-a04a-334880cb7b9f\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0;--initial-opacity:0;--initial-transform:none\">\n<div id=\"anim-e760b547-3871-4648-bae8-147ae830fe79\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0;--initial-opacity:1;--initial-transform:translate3d(0px, -287.7653%, 0)\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0;border-radius:0.5649717514124294% 0.5649717514124294% 0.5649717514124294% 0.5649717514124294% \/ 1.1235955056179776% 1.1235955056179776% 1.1235955056179776% 1.1235955056179776%\" id=\"el-d26d3b6d-6de4-4029-880f-f4c6277141e5\">\n<p class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:1.4079096045197745% 0;font-family:&quot;Darker Grotesque&quot;,sans-serif;font-size:0.453074em;line-height:1;text-align:initial;padding:0;color:#000000\"><span><span style=\"font-weight: 700; color: #fff\">4. Base cases matter&nbsp;<\/span><\/p>\n<p><span style=\"color: #fff\">Identify the base cases. They are the simplest possible inputs to the problem. Having base cases helps you terminate the recursion.<\/span><\/span><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div style=\"position:absolute;pointer-events:none;left:0.72816%;top:91.10032%;width:98.05825%;height:3.72168%;opacity:1\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0;border-radius:0.49504950495049505% 0.49504950495049505% 0.49504950495049505% 0.49504950495049505% \/ 8.695652173913043% 8.695652173913043% 8.695652173913043% 8.695652173913043%\" id=\"el-731d82d1-e0f5-4c05-bbc1-5243b3b60dd0\">\n<p class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:-0.06961633663366336% 0;font-family:&quot;Roboto&quot;,sans-serif;font-size:0.323625em;line-height:1.2;text-align:center;padding:0;color:#000000\"><span><span style=\"font-weight: 700; color: #fff\">Ready to crack DP interviews with ease?<\/span><\/span><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p><\/amp-story-grid-layer><amp-story-page-outlink layout=\"nodisplay\" cta-image=\"https:\/\/assets.interviewbit.com\/assets\/ib-logo-904db47f8d2208f21a168bfe4851e0fdcc041f2487b6a8ec0b181d3724dbd012.png.gz\"><a href=\"https:\/\/www.interviewbit.com\/courses\/programming\/dynamic-programming\/?utm_source=ib&amp;utm_medium=webstories&amp;utm_campaign=how-to-solve-any-dynamic-programming-interview-question\" rel=\"\">Explore now<\/a><\/amp-story-page-outlink><\/amp-story-page><amp-story-page id=\"c699d037-0d65-42ff-be87-cc83edf95486\" auto-advance-after=\"7s\"><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-5aaab214-8628-4e9a-acd8-c6fad58c3eee [data-leaf-element=\\\"true\\\"]\",\"keyframes\":{\"transform\":[\"translate3d(12.513852746307213%, 0, 0) translate(25%, 0%) scale(1.5)\",\"translate3d(0%, 0, 0) translate(0%, 0%) scale(1)\"]},\"delay\":0,\"duration\":2000,\"fill\":\"forwards\"}]<\/script><\/amp-story-animation><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-9e020a1c-4a8b-4ccd-af03-0ae7205131e2\",\"keyframes\":{\"opacity\":[0,1]},\"delay\":0,\"duration\":600,\"easing\":\"cubic-bezier(0.2, 0.6, 0.0, 1)\",\"fill\":\"both\"}]<\/script><\/amp-story-animation><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-f933f848-3a16-45e2-b32a-d63ff09a92bc\",\"keyframes\":{\"transform\":[\"translate3d(0px, -262.24383%, 0)\",\"translate3d(0px, 0px, 0)\"]},\"delay\":0,\"duration\":600,\"easing\":\"cubic-bezier(0.2, 0.6, 0.0, 1)\",\"fill\":\"both\"}]<\/script><\/amp-story-animation><amp-story-grid-layer template=\"vertical\" aspect-ratio=\"412:618\" class=\"grid-layer\"><\/p>\n<div class=\"page-fullbleed-area\" style=\"background-color:#a6c0c0\">\n<div class=\"page-safe-area\">\n<div style=\"position:absolute;pointer-events:none;left:0;top:-9.25926%;width:100%;height:118.51852%;opacity:1\">\n<div id=\"anim-5aaab214-8628-4e9a-acd8-c6fad58c3eee\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0\" class=\"mask\" id=\"el-b19a915c-b36c-4ffc-aa9b-88d820dd2aef\">\n<div style=\"position:absolute;width:133.38261%;height:100%;left:-16.6913%;top:0%\" data-leaf-element=\"true\"><amp-img layout=\"fill\" src=\"https:\/\/images.unsplash.com\/photo-1582138825658-fb952c08b282?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzOXx8amF2YSUyMGRldmVsb3BlcnN8ZW58MHx8fHwxNjcyOTIzNjA5&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=2707&amp;h=3608&amp;fit=max\" alt=\"man in blue hoodie looking at macbook\" srcSet=\"https:\/\/images.unsplash.com\/photo-1582138825658-fb952c08b282?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzOXx8amF2YSUyMGRldmVsb3BlcnN8ZW58MHx8fHwxNjcyOTIzNjA5&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=2707&amp;h=3608&amp;fit=max 2707w,https:\/\/images.unsplash.com\/photo-1582138825658-fb952c08b282?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzOXx8amF2YSUyMGRldmVsb3BlcnN8ZW58MHx8fHwxNjcyOTIzNjA5&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=2165&amp;h=2886&amp;fit=max 2165w,https:\/\/images.unsplash.com\/photo-1582138825658-fb952c08b282?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzOXx8amF2YSUyMGRldmVsb3BlcnN8ZW58MHx8fHwxNjcyOTIzNjA5&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=1624&amp;h=2165&amp;fit=max 1624w,https:\/\/images.unsplash.com\/photo-1582138825658-fb952c08b282?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzOXx8amF2YSUyMGRldmVsb3BlcnN8ZW58MHx8fHwxNjcyOTIzNjA5&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=1082&amp;h=1442&amp;fit=max 1082w,https:\/\/images.unsplash.com\/photo-1582138825658-fb952c08b282?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzOXx8amF2YSUyMGRldmVsb3BlcnN8ZW58MHx8fHwxNjcyOTIzNjA5&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=541&amp;h=721&amp;fit=max 541w,https:\/\/images.unsplash.com\/photo-1582138825658-fb952c08b282?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzOXx8amF2YSUyMGRldmVsb3BlcnN8ZW58MHx8fHwxNjcyOTIzNjA5&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=340&amp;h=453&amp;fit=max 340w\" sizes=\"(min-width: 1024px) 60vh, 134vw\" disable-inline-width=\"true\"><\/amp-img><\/div>\n<div class=\"element-overlay-area\" style=\"background-color:rgba(0,0,0,0.5)\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"page-background-overlay-area\" style=\"background-color:rgba(0,0,0,0.5)\"><\/div>\n<\/div>\n<\/div>\n<p><\/amp-story-grid-layer><amp-story-grid-layer template=\"vertical\" aspect-ratio=\"412:618\" class=\"grid-layer\"><\/p>\n<div class=\"page-fullbleed-area\">\n<div class=\"page-safe-area\">\n<div style=\"position:absolute;pointer-events:none;left:-16.01942%;top:53.07443%;width:139.56311%;height:36.08414%;opacity:1\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0\" class=\"mask\" id=\"el-fd550b36-80a6-47dc-b294-5865799c9537\">\n<div class=\"fill\" style=\"background-color:rgba(18,99,255,0.5);will-change:transform\"><\/div>\n<\/div>\n<\/div>\n<div style=\"position:absolute;pointer-events:none;left:-0.72816%;top:-6.47249%;width:43.68932%;height:9.70874%;opacity:1\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0\" class=\"mask\" id=\"el-3e628981-0470-432e-b450-b46b4dd70164\">\n<div style=\"position:absolute;width:100.28251%;height:100%;left:-0.14125%;top:0%\" data-leaf-element=\"true\"><amp-img layout=\"fill\" src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2.png\" alt=\"InterviewBit-White-2\" srcSet=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2.png 2130w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-2048x681.png 2048w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-1536x511.png 1536w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-1024x340.png 1024w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-768x255.png 768w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-300x100.png 300w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-150x50.png 150w\" sizes=\"(min-width: 1024px) 20vh, 44vw\" disable-inline-width=\"true\"><\/amp-img><\/div>\n<\/div>\n<\/div>\n<div style=\"position:absolute;pointer-events:none;left:7.03883%;top:44.82201%;width:85.92233%;height:33.33333%;opacity:1\">\n<div id=\"anim-9e020a1c-4a8b-4ccd-af03-0ae7205131e2\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0;--initial-opacity:0;--initial-transform:none\">\n<div id=\"anim-f933f848-3a16-45e2-b32a-d63ff09a92bc\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0;--initial-opacity:1;--initial-transform:translate3d(0px, -262.24383%, 0)\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0;border-radius:0.5649717514124294% 0.5649717514124294% 0.5649717514124294% 0.5649717514124294% \/ 0.9708737864077669% 0.9708737864077669% 0.9708737864077669% 0.9708737864077669%\" id=\"el-cdf613ea-fe94-4331-b424-0e75c711993d\">\n<p class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:1.4079096045197745% 0;font-family:&quot;Darker Grotesque&quot;,sans-serif;font-size:0.453074em;line-height:1;text-align:initial;padding:0;color:#000000\"><span><span style=\"font-weight: 700; color: #fff\">5. Iterate or Recurse?&nbsp;<\/span><\/p>\n<p><span style=\"color: #fff\">Decide whether to implement the problem iteratively or recursively. Iterative solutions are usually faster, but recursive solutions are easier to understand.<\/span><\/span><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div style=\"position:absolute;pointer-events:none;left:0.72816%;top:91.10032%;width:98.05825%;height:3.72168%;opacity:1\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0;border-radius:0.49504950495049505% 0.49504950495049505% 0.49504950495049505% 0.49504950495049505% \/ 8.695652173913043% 8.695652173913043% 8.695652173913043% 8.695652173913043%\" id=\"el-e390a197-8b40-4012-99d7-cc48dc01ec2c\">\n<p class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:-0.06961633663366336% 0;font-family:&quot;Roboto&quot;,sans-serif;font-size:0.323625em;line-height:1.2;text-align:center;padding:0;color:#000000\"><span><span style=\"font-weight: 700; color: #fff\">Ready to crack DP interviews with ease?<\/span><\/span><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p><\/amp-story-grid-layer><amp-story-page-outlink layout=\"nodisplay\" cta-image=\"https:\/\/assets.interviewbit.com\/assets\/ib-logo-904db47f8d2208f21a168bfe4851e0fdcc041f2487b6a8ec0b181d3724dbd012.png.gz\"><a href=\"https:\/\/www.interviewbit.com\/courses\/programming\/dynamic-programming\/?utm_source=ib&amp;utm_medium=webstories&amp;utm_campaign=how-to-solve-any-dynamic-programming-interview-question\" rel=\"\">Explore now<\/a><\/amp-story-page-outlink><\/amp-story-page><amp-story-page id=\"58c96625-3ab1-427b-95e4-8164f9bd6367\" auto-advance-after=\"7s\"><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-ba6bfa6f-3aa9-4c87-ac8d-d014f1752b05 [data-leaf-element=\\\"true\\\"]\",\"keyframes\":{\"transform\":[\"translate3d(7.8049433226831555%, 0, 0) translate(25%, 0%) scale(1.5)\",\"translate3d(0%, 0, 0) translate(0%, 0%) scale(1)\"]},\"delay\":0,\"duration\":2000,\"fill\":\"forwards\"}]<\/script><\/amp-story-animation><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-16c8fbbd-5f3c-4b1e-96ee-d0f20679bf12\",\"keyframes\":{\"opacity\":[0,1]},\"delay\":0,\"duration\":600,\"easing\":\"cubic-bezier(0.2, 0.6, 0.0, 1)\",\"fill\":\"both\"}]<\/script><\/amp-story-animation><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-6ca6b273-b12b-4f10-bae1-0e1b5e3d00ac\",\"keyframes\":{\"transform\":[\"translate3d(0px, -262.24383%, 0)\",\"translate3d(0px, 0px, 0)\"]},\"delay\":0,\"duration\":600,\"easing\":\"cubic-bezier(0.2, 0.6, 0.0, 1)\",\"fill\":\"both\"}]<\/script><\/amp-story-animation><amp-story-grid-layer template=\"vertical\" aspect-ratio=\"412:618\" class=\"grid-layer\"><\/p>\n<div class=\"page-fullbleed-area\" style=\"background-color:#404040\">\n<div class=\"page-safe-area\">\n<div style=\"position:absolute;pointer-events:none;left:0;top:-9.25926%;width:100%;height:118.51852%;opacity:1\">\n<div id=\"anim-ba6bfa6f-3aa9-4c87-ac8d-d014f1752b05\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0\" class=\"mask\" id=\"el-de5cfed0-3524-444b-8ba8-844b625d16ed\">\n<div style=\"position:absolute;width:118.4973%;height:100%;left:-9.24865%;top:0%\" data-leaf-element=\"true\"><amp-img layout=\"fill\" src=\"https:\/\/images.unsplash.com\/photo-1545184180-25d471fe75eb?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxtYW4lMjB3aXRoJTIwbGFwdG9wfGVufDB8fHx8MTY3NzU4Nzg0Nw&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=1861&amp;h=2792&amp;fit=max\" alt=\"man sitting while having coffee and using laptop\" srcSet=\"https:\/\/images.unsplash.com\/photo-1545184180-25d471fe75eb?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxtYW4lMjB3aXRoJTIwbGFwdG9wfGVufDB8fHx8MTY3NzU4Nzg0Nw&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=1861&amp;h=2792&amp;fit=max 1861w,https:\/\/images.unsplash.com\/photo-1545184180-25d471fe75eb?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxtYW4lMjB3aXRoJTIwbGFwdG9wfGVufDB8fHx8MTY3NzU4Nzg0Nw&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=1488&amp;h=2232&amp;fit=max 1488w,https:\/\/images.unsplash.com\/photo-1545184180-25d471fe75eb?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxtYW4lMjB3aXRoJTIwbGFwdG9wfGVufDB8fHx8MTY3NzU4Nzg0Nw&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=1116&amp;h=1674&amp;fit=max 1116w,https:\/\/images.unsplash.com\/photo-1545184180-25d471fe75eb?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxtYW4lMjB3aXRoJTIwbGFwdG9wfGVufDB8fHx8MTY3NzU4Nzg0Nw&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=744&amp;h=1116&amp;fit=max 744w,https:\/\/images.unsplash.com\/photo-1545184180-25d471fe75eb?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxtYW4lMjB3aXRoJTIwbGFwdG9wfGVufDB8fHx8MTY3NzU4Nzg0Nw&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=372&amp;h=558&amp;fit=max 372w,https:\/\/images.unsplash.com\/photo-1545184180-25d471fe75eb?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxtYW4lMjB3aXRoJTIwbGFwdG9wfGVufDB8fHx8MTY3NzU4Nzg0Nw&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=340&amp;h=510&amp;fit=max 340w\" sizes=\"(min-width: 1024px) 53vh, 119vw\" disable-inline-width=\"true\"><\/amp-img><\/div>\n<div class=\"element-overlay-area\" style=\"background-color:rgba(0,0,0,0.5)\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"page-background-overlay-area\" style=\"background-color:rgba(0,0,0,0.5)\"><\/div>\n<\/div>\n<\/div>\n<p><\/amp-story-grid-layer><amp-story-grid-layer template=\"vertical\" aspect-ratio=\"412:618\" class=\"grid-layer\"><\/p>\n<div class=\"page-fullbleed-area\">\n<div class=\"page-safe-area\">\n<div style=\"position:absolute;pointer-events:none;left:-16.01942%;top:53.07443%;width:139.56311%;height:36.08414%;opacity:1\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0\" class=\"mask\" id=\"el-acf43490-ac1f-44f4-8c80-94a6d8620b66\">\n<div class=\"fill\" style=\"background-color:rgba(18,99,255,0.5);will-change:transform\"><\/div>\n<\/div>\n<\/div>\n<div style=\"position:absolute;pointer-events:none;left:-0.72816%;top:-6.47249%;width:43.68932%;height:9.70874%;opacity:1\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0\" class=\"mask\" id=\"el-8ea3c9b6-cf44-4a37-aa52-d09910e35602\">\n<div style=\"position:absolute;width:100.28251%;height:100%;left:-0.14125%;top:0%\" data-leaf-element=\"true\"><amp-img layout=\"fill\" src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2.png\" alt=\"InterviewBit-White-2\" srcSet=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2.png 2130w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-2048x681.png 2048w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-1536x511.png 1536w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-1024x340.png 1024w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-768x255.png 768w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-300x100.png 300w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-150x50.png 150w\" sizes=\"(min-width: 1024px) 20vh, 44vw\" disable-inline-width=\"true\"><\/amp-img><\/div>\n<\/div>\n<\/div>\n<div style=\"position:absolute;pointer-events:none;left:7.03883%;top:44.82201%;width:85.92233%;height:33.33333%;opacity:1\">\n<div id=\"anim-16c8fbbd-5f3c-4b1e-96ee-d0f20679bf12\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0;--initial-opacity:0;--initial-transform:none\">\n<div id=\"anim-6ca6b273-b12b-4f10-bae1-0e1b5e3d00ac\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0;--initial-opacity:1;--initial-transform:translate3d(0px, -262.24383%, 0)\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0;border-radius:0.5649717514124294% 0.5649717514124294% 0.5649717514124294% 0.5649717514124294% \/ 0.9708737864077669% 0.9708737864077669% 0.9708737864077669% 0.9708737864077669%\" id=\"el-95fa3ff2-d162-4634-b2ae-9757ed286f9f\">\n<p class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:1.4079096045197745% 0;font-family:&quot;Darker Grotesque&quot;,sans-serif;font-size:0.453074em;line-height:1;text-align:initial;padding:0;color:#000000\"><span><span style=\"font-weight: 700; color: #fff\">6. Memoize to optimize&nbsp;<\/span><\/p>\n<p><span style=\"color: #fff\">Add memoization to your solution. Memoization stores the results of previous calculations &amp; avoids redundant calculations. It&#8217;s a great way to optimize DP solutions.<\/span><\/span><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div style=\"position:absolute;pointer-events:none;left:0.72816%;top:91.10032%;width:98.05825%;height:3.72168%;opacity:1\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0;border-radius:0.49504950495049505% 0.49504950495049505% 0.49504950495049505% 0.49504950495049505% \/ 8.695652173913043% 8.695652173913043% 8.695652173913043% 8.695652173913043%\" id=\"el-70dfeb7b-db08-4e3f-ad50-aca6e893a417\">\n<p class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:-0.06961633663366336% 0;font-family:&quot;Roboto&quot;,sans-serif;font-size:0.323625em;line-height:1.2;text-align:center;padding:0;color:#000000\"><span><span style=\"font-weight: 700; color: #fff\">Ready to crack DP interviews with ease?<\/span><\/span><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p><\/amp-story-grid-layer><amp-story-page-outlink layout=\"nodisplay\" cta-image=\"https:\/\/assets.interviewbit.com\/assets\/ib-logo-904db47f8d2208f21a168bfe4851e0fdcc041f2487b6a8ec0b181d3724dbd012.png.gz\"><a href=\"https:\/\/www.interviewbit.com\/courses\/programming\/dynamic-programming\/?utm_source=ib&amp;utm_medium=webstories&amp;utm_campaign=how-to-solve-any-dynamic-programming-interview-question\" rel=\"\">Explore now<\/a><\/amp-story-page-outlink><\/amp-story-page><amp-story-page id=\"4147d07a-9c06-4df9-af09-c51340cff88c\" auto-advance-after=\"7s\"><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-ce3f52fb-3b4f-4463-ab44-b3193cbf4a60 [data-leaf-element=\\\"true\\\"]\",\"keyframes\":{\"transform\":[\"translate3d(7.8049433226831555%, 0, 0) translate(25%, 0%) scale(1.5)\",\"translate3d(0%, 0, 0) translate(0%, 0%) scale(1)\"]},\"delay\":0,\"duration\":2000,\"fill\":\"forwards\"}]<\/script><\/amp-story-animation><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-5c399805-ad57-45c6-a396-c68a48b2e399\",\"keyframes\":{\"opacity\":[0,1]},\"delay\":0,\"duration\":600,\"easing\":\"cubic-bezier(0.2, 0.6, 0.0, 1)\",\"fill\":\"both\"}]<\/script><\/amp-story-animation><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-598aa886-5547-47d9-9fa5-49114fec81a5\",\"keyframes\":{\"transform\":[\"translate3d(0px, -287.7653%, 0)\",\"translate3d(0px, 0px, 0)\"]},\"delay\":0,\"duration\":600,\"easing\":\"cubic-bezier(0.2, 0.6, 0.0, 1)\",\"fill\":\"both\"}]<\/script><\/amp-story-animation><amp-story-grid-layer template=\"vertical\" aspect-ratio=\"412:618\" class=\"grid-layer\"><\/p>\n<div class=\"page-fullbleed-area\" style=\"background-color:#404040\">\n<div class=\"page-safe-area\">\n<div style=\"position:absolute;pointer-events:none;left:0;top:-9.25926%;width:100%;height:118.51852%;opacity:1\">\n<div id=\"anim-ce3f52fb-3b4f-4463-ab44-b3193cbf4a60\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0\" class=\"mask\" id=\"el-f7a422eb-5bb3-47e1-a8d5-dd78d07805a2\">\n<div style=\"position:absolute;width:118.4973%;height:100%;left:-9.24865%;top:0%\" data-leaf-element=\"true\"><amp-img layout=\"fill\" src=\"https:\/\/images.unsplash.com\/photo-1545184180-25d471fe75eb?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxtYW4lMjB3aXRoJTIwbGFwdG9wfGVufDB8fHx8MTY3NzU4Nzg0Nw&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=1861&amp;h=2792&amp;fit=max\" alt=\"man sitting while having coffee and using laptop\" srcSet=\"https:\/\/images.unsplash.com\/photo-1545184180-25d471fe75eb?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxtYW4lMjB3aXRoJTIwbGFwdG9wfGVufDB8fHx8MTY3NzU4Nzg0Nw&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=1861&amp;h=2792&amp;fit=max 1861w,https:\/\/images.unsplash.com\/photo-1545184180-25d471fe75eb?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxtYW4lMjB3aXRoJTIwbGFwdG9wfGVufDB8fHx8MTY3NzU4Nzg0Nw&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=1488&amp;h=2232&amp;fit=max 1488w,https:\/\/images.unsplash.com\/photo-1545184180-25d471fe75eb?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxtYW4lMjB3aXRoJTIwbGFwdG9wfGVufDB8fHx8MTY3NzU4Nzg0Nw&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=1116&amp;h=1674&amp;fit=max 1116w,https:\/\/images.unsplash.com\/photo-1545184180-25d471fe75eb?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxtYW4lMjB3aXRoJTIwbGFwdG9wfGVufDB8fHx8MTY3NzU4Nzg0Nw&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=744&amp;h=1116&amp;fit=max 744w,https:\/\/images.unsplash.com\/photo-1545184180-25d471fe75eb?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxtYW4lMjB3aXRoJTIwbGFwdG9wfGVufDB8fHx8MTY3NzU4Nzg0Nw&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=372&amp;h=558&amp;fit=max 372w,https:\/\/images.unsplash.com\/photo-1545184180-25d471fe75eb?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxtYW4lMjB3aXRoJTIwbGFwdG9wfGVufDB8fHx8MTY3NzU4Nzg0Nw&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=340&amp;h=510&amp;fit=max 340w\" sizes=\"(min-width: 1024px) 53vh, 119vw\" disable-inline-width=\"true\"><\/amp-img><\/div>\n<div class=\"element-overlay-area\" style=\"background-color:rgba(0,0,0,0.5)\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"page-background-overlay-area\" style=\"background-color:rgba(0,0,0,0.5)\"><\/div>\n<\/div>\n<\/div>\n<p><\/amp-story-grid-layer><amp-story-grid-layer template=\"vertical\" aspect-ratio=\"412:618\" class=\"grid-layer\"><\/p>\n<div class=\"page-fullbleed-area\">\n<div class=\"page-safe-area\">\n<div style=\"position:absolute;pointer-events:none;left:-16.01942%;top:53.07443%;width:139.56311%;height:36.08414%;opacity:1\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0\" class=\"mask\" id=\"el-a6f00ed3-e9bd-42ef-868e-c3ed3fea9f5a\">\n<div class=\"fill\" style=\"background-color:rgba(18,99,255,0.5);will-change:transform\"><\/div>\n<\/div>\n<\/div>\n<div style=\"position:absolute;pointer-events:none;left:-0.72816%;top:-6.47249%;width:43.68932%;height:9.70874%;opacity:1\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0\" class=\"mask\" id=\"el-060348f7-1aed-4c75-bc7e-450c170b43d5\">\n<div style=\"position:absolute;width:100.28251%;height:100%;left:-0.14125%;top:0%\" data-leaf-element=\"true\"><amp-img layout=\"fill\" src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2.png\" alt=\"InterviewBit-White-2\" srcSet=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2.png 2130w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-2048x681.png 2048w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-1536x511.png 1536w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-1024x340.png 1024w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-768x255.png 768w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-300x100.png 300w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-150x50.png 150w\" sizes=\"(min-width: 1024px) 20vh, 44vw\" disable-inline-width=\"true\"><\/amp-img><\/div>\n<\/div>\n<\/div>\n<div style=\"position:absolute;pointer-events:none;left:7.03883%;top:44.82201%;width:85.92233%;height:28.80259%;opacity:1\">\n<div id=\"anim-5c399805-ad57-45c6-a396-c68a48b2e399\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0;--initial-opacity:0;--initial-transform:none\">\n<div id=\"anim-598aa886-5547-47d9-9fa5-49114fec81a5\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0;--initial-opacity:1;--initial-transform:translate3d(0px, -287.7653%, 0)\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0;border-radius:0.5649717514124294% 0.5649717514124294% 0.5649717514124294% 0.5649717514124294% \/ 1.1235955056179776% 1.1235955056179776% 1.1235955056179776% 1.1235955056179776%\" id=\"el-cd44ef26-0897-429b-978a-05093f323da3\">\n<p class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:1.4079096045197745% 0;font-family:&quot;Darker Grotesque&quot;,sans-serif;font-size:0.453074em;line-height:1;text-align:initial;padding:0;color:#000000\"><span><span style=\"font-weight: 700; color: #fff\">7. Time is of the essence&nbsp;<\/span><\/p>\n<p><span style=\"color: #fff\">Determine the time complexity of your solution. It tells you how efficient your algorithm is. A good time complexity is O(n) or better.<\/span><\/span><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div style=\"position:absolute;pointer-events:none;left:0.72816%;top:91.10032%;width:98.05825%;height:3.72168%;opacity:1\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0;border-radius:0.49504950495049505% 0.49504950495049505% 0.49504950495049505% 0.49504950495049505% \/ 8.695652173913043% 8.695652173913043% 8.695652173913043% 8.695652173913043%\" id=\"el-1302546c-ee62-4655-a81d-6a56a7420f42\">\n<p class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:-0.06961633663366336% 0;font-family:&quot;Roboto&quot;,sans-serif;font-size:0.323625em;line-height:1.2;text-align:center;padding:0;color:#000000\"><span><span style=\"font-weight: 700; color: #fff\">Ready to crack DP interviews with ease?<\/span><\/span><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p><\/amp-story-grid-layer><amp-story-page-outlink layout=\"nodisplay\"><a href=\"https:\/\/www.interviewbit.com\/courses\/programming\/dynamic-programming\/?utm_source=ib&amp;utm_medium=webstories&amp;utm_campaign=how-to-solve-any-dynamic-programming-interview-question\" rel=\"\">Explore now<\/a><\/amp-story-page-outlink><\/amp-story-page><amp-story-page id=\"54247e4a-4c34-4389-9ef8-e2ad1e555aa1\" auto-advance-after=\"7s\"><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-31d6a2ae-cf31-413f-a89c-57cfffb7b75d\",\"keyframes\":{\"opacity\":[0,1]},\"delay\":0,\"duration\":1000,\"easing\":\"cubic-bezier(0.2, 0.6, 0.0, 1)\",\"fill\":\"both\"}]<\/script><\/amp-story-animation><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-98c7604f-f2ba-4a07-b428-b7db0d5237e3\",\"keyframes\":{\"transform\":[\"translate3d(0px, -267.31555%, 0)\",\"translate3d(0px, 0px, 0)\"]},\"delay\":0,\"duration\":1000,\"easing\":\"cubic-bezier(0.2, 0.6, 0.0, 1)\",\"fill\":\"both\"}]<\/script><\/amp-story-animation><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-837b410c-ef80-4d9f-af2d-03e18dca88fc\",\"keyframes\":{\"opacity\":[0,1]},\"delay\":0,\"duration\":600,\"easing\":\"cubic-bezier(0.2, 0.6, 0.0, 1)\",\"fill\":\"both\"}]<\/script><\/amp-story-animation><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-c65e050d-2c7d-4a69-a210-1c09315289e6\",\"keyframes\":{\"transform\":[\"translate3d(0px, -412.79182%, 0)\",\"translate3d(0px, 0px, 0)\"]},\"delay\":0,\"duration\":600,\"easing\":\"cubic-bezier(0.2, 0.6, 0.0, 1)\",\"fill\":\"both\"}]<\/script><\/amp-story-animation><amp-story-grid-layer template=\"vertical\" aspect-ratio=\"412:618\" class=\"grid-layer\"><\/p>\n<div class=\"page-fullbleed-area\" style=\"background-color:#262626\">\n<div class=\"page-safe-area\">\n<div style=\"position:absolute;pointer-events:none;left:0;top:-9.25926%;width:100%;height:118.51852%;opacity:1\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0\" class=\"mask\" id=\"el-52e4f493-e25d-4e03-b7aa-697c8631c3c3\">\n<div style=\"position:absolute;width:267.66542%;height:100%;left:-83.83271%;top:0%\" data-leaf-element=\"true\"><amp-img layout=\"fill\" src=\"https:\/\/images.unsplash.com\/photo-1497091071254-cc9b2ba7c48a?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw0MHx8cmVzdW1lfGVufDB8fHx8MTY2NjA2MjgxNA&amp;ixlib=rb-1.2.1&amp;fm=jpg&amp;w=4288&amp;h=2848&amp;fit=max\" alt=\"person using track pad\" srcSet=\"https:\/\/images.unsplash.com\/photo-1497091071254-cc9b2ba7c48a?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw0MHx8cmVzdW1lfGVufDB8fHx8MTY2NjA2MjgxNA&amp;ixlib=rb-1.2.1&amp;fm=jpg&amp;w=4288&amp;h=2848&amp;fit=max 4288w,https:\/\/images.unsplash.com\/photo-1497091071254-cc9b2ba7c48a?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw0MHx8cmVzdW1lfGVufDB8fHx8MTY2NjA2MjgxNA&amp;ixlib=rb-1.2.1&amp;fm=jpg&amp;w=3430&amp;h=2278&amp;fit=max 3430w,https:\/\/images.unsplash.com\/photo-1497091071254-cc9b2ba7c48a?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw0MHx8cmVzdW1lfGVufDB8fHx8MTY2NjA2MjgxNA&amp;ixlib=rb-1.2.1&amp;fm=jpg&amp;w=2572&amp;h=1708&amp;fit=max 2572w,https:\/\/images.unsplash.com\/photo-1497091071254-cc9b2ba7c48a?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw0MHx8cmVzdW1lfGVufDB8fHx8MTY2NjA2MjgxNA&amp;ixlib=rb-1.2.1&amp;fm=jpg&amp;w=1715&amp;h=1139&amp;fit=max 1715w,https:\/\/images.unsplash.com\/photo-1497091071254-cc9b2ba7c48a?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw0MHx8cmVzdW1lfGVufDB8fHx8MTY2NjA2MjgxNA&amp;ixlib=rb-1.2.1&amp;fm=jpg&amp;w=857&amp;h=569&amp;fit=max 857w,https:\/\/images.unsplash.com\/photo-1497091071254-cc9b2ba7c48a?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw0MHx8cmVzdW1lfGVufDB8fHx8MTY2NjA2MjgxNA&amp;ixlib=rb-1.2.1&amp;fm=jpg&amp;w=340&amp;h=226&amp;fit=max 340w\" sizes=\"(min-width: 1024px) 121vh, 268vw\" disable-inline-width=\"true\"><\/amp-img><\/div>\n<div class=\"element-overlay-area\" style=\"background-image:linear-gradient(0.5turn, rgba(0,0,0,0) 40%, rgba(0,0,0,0.5) 100%)\"><\/div>\n<\/div>\n<\/div>\n<div class=\"page-background-overlay-area\" style=\"background-image:linear-gradient(0.5turn, rgba(0,0,0,0) 40%, rgba(0,0,0,0.5) 100%)\"><\/div>\n<\/div>\n<\/div>\n<p><\/amp-story-grid-layer><amp-story-grid-layer template=\"vertical\" aspect-ratio=\"412:618\" class=\"grid-layer\"><\/p>\n<div class=\"page-fullbleed-area\">\n<div class=\"page-safe-area\">\n<div style=\"position:absolute;pointer-events:none;left:-0.72816%;top:-6.47249%;width:43.68932%;height:9.70874%;opacity:1\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0\" class=\"mask\" id=\"el-85da65c1-1fb2-40ba-8a02-41ca3ec7d153\">\n<div style=\"position:absolute;width:100.28251%;height:100%;left:-0.14125%;top:0%\" data-leaf-element=\"true\"><amp-img layout=\"fill\" src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2.png\" alt=\"InterviewBit-White-2\" srcSet=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2.png 2130w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-2048x681.png 2048w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-1536x511.png 1536w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-1024x340.png 1024w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-768x255.png 768w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-300x100.png 300w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-150x50.png 150w\" sizes=\"(min-width: 1024px) 20vh, 44vw\" disable-inline-width=\"true\"><\/amp-img><\/div>\n<\/div>\n<\/div>\n<div style=\"position:absolute;pointer-events:none;left:4.85437%;top:50.97087%;width:87.86408%;height:19.25566%;opacity:1\">\n<div id=\"anim-837b410c-ef80-4d9f-af2d-03e18dca88fc\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0;--initial-opacity:0;--initial-transform:none\">\n<div id=\"anim-c65e050d-2c7d-4a69-a210-1c09315289e6\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0;--initial-opacity:1;--initial-transform:translate3d(0px, -412.79182%, 0)\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0;border-radius:0.5524861878453038% 0.5524861878453038% 0.5524861878453038% 0.5524861878453038% \/ 1.680672268907563% 1.680672268907563% 1.680672268907563% 1.680672268907563%\" id=\"el-8f22a9ff-495f-41ca-b7f2-b60d1aa3ab6b\">\n<h3 id=\"look-no-further-than-interviewbit-with-level-by-level-problems-and-easy-to-understand-concepts-youll-be-a-dynamic-programming-pro-in-no-time\" class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:0.5460117403314918% 0;font-family:&quot;Roboto&quot;,sans-serif;font-size:0.372168em;line-height:1;text-align:left;padding:0;color:#000000\"><span><span style=\"color: #1263ff\">Look no further than InterviewBit. With level-by-level problems and easy-to-understand concepts, you&#8217;ll be a Dynamic Programming pro in no time.<\/span><\/span><\/h3>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div style=\"position:absolute;pointer-events:none;left:4.85437%;top:27.83172%;width:86.40777%;height:22.16828%;opacity:1\">\n<div id=\"anim-31d6a2ae-cf31-413f-a89c-57cfffb7b75d\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0;--initial-opacity:0;--initial-transform:none\">\n<div id=\"anim-98c7604f-f2ba-4a07-b428-b7db0d5237e3\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0;--initial-opacity:1;--initial-transform:translate3d(0px, -267.31555%, 0)\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0\" id=\"el-d0a9448e-0825-4a27-afef-cf3753e1b025\">\n<p class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:1.601123595505617% 0;font-family:&quot;Poppins&quot;,sans-serif;font-size:0.614887em;line-height:1.1;text-align:initial;padding:0;color:#000000\"><span><span style=\"font-weight: 700; color: #fff\">Ready to take your career to new heights?<\/span><\/span><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div style=\"position:absolute;pointer-events:none;left:4.12621%;top:17.79935%;width:11.40777%;height:7.28155%;opacity:1\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0;clip-path:url(#el-cab5dc4e-70e7-446a-9516-9aa3a621a79e);-webkit-clip-path:url(#el-cab5dc4e-70e7-446a-9516-9aa3a621a79e)\" class=\"mask\"><svg width=\"0\" height=\"0\"><defs><clipPath id=\"el-cab5dc4e-70e7-446a-9516-9aa3a621a79e\" transform=\"scale(1 1.051524710830705)\" clipPathUnits=\"objectBoundingBox\"><path d=\"M 0.50000026,0.78688566 0.19262278,0.95082018 0.2500004,0.6065577 0,0.36065594 0.34426194,0.31147556 0.50000026,0 0.65573858,0.31147556 1,0.36065594 0.75000014,0.6065577 0.80737774,0.95082018 Z\"><\/path><\/clipPath><\/defs><\/svg><\/p>\n<div class=\"fill\" style=\"background-color:#003bad;will-change:transform\"><\/div>\n<\/div>\n<\/div>\n<div style=\"position:absolute;pointer-events:none;left:15.29126%;top:17.79935%;width:11.40777%;height:7.28155%;opacity:1\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0;clip-path:url(#el-5c602a45-e2cf-49cf-ae22-88ed66d35076);-webkit-clip-path:url(#el-5c602a45-e2cf-49cf-ae22-88ed66d35076)\" class=\"mask\"><svg width=\"0\" height=\"0\"><defs><clipPath id=\"el-5c602a45-e2cf-49cf-ae22-88ed66d35076\" transform=\"scale(1 1.051524710830705)\" clipPathUnits=\"objectBoundingBox\"><path d=\"M 0.50000026,0.78688566 0.19262278,0.95082018 0.2500004,0.6065577 0,0.36065594 0.34426194,0.31147556 0.50000026,0 0.65573858,0.31147556 1,0.36065594 0.75000014,0.6065577 0.80737774,0.95082018 Z\"><\/path><\/clipPath><\/defs><\/svg><\/p>\n<div class=\"fill\" style=\"background-color:#003bad;will-change:transform\"><\/div>\n<\/div>\n<\/div>\n<div style=\"position:absolute;pointer-events:none;left:26.94175%;top:17.79935%;width:11.40777%;height:7.28155%;opacity:1\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0;clip-path:url(#el-ada07d4b-2570-4c81-9db5-3dd8141745b8);-webkit-clip-path:url(#el-ada07d4b-2570-4c81-9db5-3dd8141745b8)\" class=\"mask\"><svg width=\"0\" height=\"0\"><defs><clipPath id=\"el-ada07d4b-2570-4c81-9db5-3dd8141745b8\" transform=\"scale(1 1.051524710830705)\" clipPathUnits=\"objectBoundingBox\"><path d=\"M 0.50000026,0.78688566 0.19262278,0.95082018 0.2500004,0.6065577 0,0.36065594 0.34426194,0.31147556 0.50000026,0 0.65573858,0.31147556 1,0.36065594 0.75000014,0.6065577 0.80737774,0.95082018 Z\"><\/path><\/clipPath><\/defs><\/svg><\/p>\n<div class=\"fill\" style=\"background-color:#003bad;will-change:transform\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p><\/amp-story-grid-layer><amp-story-page-outlink layout=\"nodisplay\" cta-image=\"https:\/\/assets.interviewbit.com\/assets\/ib-logo-904db47f8d2208f21a168bfe4851e0fdcc041f2487b6a8ec0b181d3724dbd012.png.gz\"><a href=\"https:\/\/www.interviewbit.com\/courses\/programming\/dynamic-programming\/?utm_source=ib&amp;utm_medium=webstories&amp;utm_campaign=how-to-solve-any-dynamic-programming-interview-question\" rel=\"\">Explore now<\/a><\/amp-story-page-outlink><\/amp-story-page><amp-story-page id=\"a27658a0-6f2c-44e2-9fcd-1060a35bd56d\" auto-advance-after=\"7s\"><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-cca0d621-5168-40a5-b30c-9419c0da7cdf\",\"keyframes\":{\"opacity\":[0,1]},\"delay\":0,\"duration\":1000,\"easing\":\"cubic-bezier(0.2, 0.6, 0.0, 1)\",\"fill\":\"both\"}]<\/script><\/amp-story-animation><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-eac36493-a65f-421d-b258-0857562d9f3a\",\"keyframes\":{\"transform\":[\"translate3d(0px, -211.49618%, 0)\",\"translate3d(0px, 0px, 0)\"]},\"delay\":0,\"duration\":1000,\"easing\":\"cubic-bezier(0.2, 0.6, 0.0, 1)\",\"fill\":\"both\"}]<\/script><\/amp-story-animation><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-35bd5cb7-85f9-4b1c-98d6-5aaac0c9c793\",\"keyframes\":{\"opacity\":[0,1]},\"delay\":0,\"duration\":600,\"easing\":\"cubic-bezier(0.2, 0.6, 0.0, 1)\",\"fill\":\"both\"}]<\/script><\/amp-story-animation><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-d42bab2b-d57e-464d-9022-fb538fbe37ca\",\"keyframes\":{\"transform\":[\"translate3d(0px, -621.00265%, 0)\",\"translate3d(0px, 0px, 0)\"]},\"delay\":0,\"duration\":600,\"easing\":\"cubic-bezier(0.2, 0.6, 0.0, 1)\",\"fill\":\"both\"}]<\/script><\/amp-story-animation><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-6fdb77bf-00c8-4f57-83f1-b9c44d03385e [data-leaf-element=\\\"true\\\"]\",\"keyframes\":{\"transform\":[\"translate3d(7.812499744007886%, 0, 0) translate(25%, 0%) scale(1.5)\",\"translate3d(0%, 0, 0) translate(0%, 0%) scale(1)\"]},\"delay\":0,\"duration\":2000,\"fill\":\"forwards\"}]<\/script><\/amp-story-animation><amp-story-grid-layer template=\"vertical\" aspect-ratio=\"412:618\" class=\"grid-layer\"><\/p>\n<div class=\"page-fullbleed-area\" style=\"background-color:#0c2626\">\n<div class=\"page-safe-area\">\n<div style=\"position:absolute;pointer-events:none;left:0;top:-9.25926%;width:100%;height:118.51852%;opacity:1\">\n<div id=\"anim-6fdb77bf-00c8-4f57-83f1-b9c44d03385e\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0\" class=\"mask\" id=\"el-a604e4f2-daba-4791-93e8-e72b50eb1cb3\">\n<div style=\"position:absolute;width:118.51852%;height:100%;left:-9.25926%;top:0%\" data-leaf-element=\"true\"><amp-img layout=\"fill\" src=\"https:\/\/images.unsplash.com\/photo-1575089976121-8ed7b2a54265?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxzb2Z0d2FyZSUyMGRldmVsb3BlcnxlbnwwfHx8fDE2NzU3OTAyMTE&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=4000&amp;h=6000&amp;fit=max\" alt=\"man using laptop\" srcSet=\"https:\/\/images.unsplash.com\/photo-1575089976121-8ed7b2a54265?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxzb2Z0d2FyZSUyMGRldmVsb3BlcnxlbnwwfHx8fDE2NzU3OTAyMTE&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=4000&amp;h=6000&amp;fit=max 4000w,https:\/\/images.unsplash.com\/photo-1575089976121-8ed7b2a54265?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxzb2Z0d2FyZSUyMGRldmVsb3BlcnxlbnwwfHx8fDE2NzU3OTAyMTE&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=3200&amp;h=4800&amp;fit=max 3200w,https:\/\/images.unsplash.com\/photo-1575089976121-8ed7b2a54265?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxzb2Z0d2FyZSUyMGRldmVsb3BlcnxlbnwwfHx8fDE2NzU3OTAyMTE&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=2400&amp;h=3600&amp;fit=max 2400w,https:\/\/images.unsplash.com\/photo-1575089976121-8ed7b2a54265?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxzb2Z0d2FyZSUyMGRldmVsb3BlcnxlbnwwfHx8fDE2NzU3OTAyMTE&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=1600&amp;h=2400&amp;fit=max 1600w,https:\/\/images.unsplash.com\/photo-1575089976121-8ed7b2a54265?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxzb2Z0d2FyZSUyMGRldmVsb3BlcnxlbnwwfHx8fDE2NzU3OTAyMTE&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=800&amp;h=1200&amp;fit=max 800w,https:\/\/images.unsplash.com\/photo-1575089976121-8ed7b2a54265?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxzb2Z0d2FyZSUyMGRldmVsb3BlcnxlbnwwfHx8fDE2NzU3OTAyMTE&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=340&amp;h=510&amp;fit=max 340w\" sizes=\"(min-width: 1024px) 53vh, 119vw\" disable-inline-width=\"true\"><\/amp-img><\/div>\n<div class=\"element-overlay-area\" style=\"background-color:rgba(0,0,0,0.5)\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"page-background-overlay-area\" style=\"background-color:rgba(0,0,0,0.5)\"><\/div>\n<\/div>\n<\/div>\n<p><\/amp-story-grid-layer><amp-story-grid-layer template=\"vertical\" aspect-ratio=\"412:618\" class=\"grid-layer\"><\/p>\n<div class=\"page-fullbleed-area\">\n<div class=\"page-safe-area\">\n<div style=\"position:absolute;pointer-events:none;left:-0.72816%;top:-6.47249%;width:43.68932%;height:9.70874%;opacity:1\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0\" class=\"mask\" id=\"el-0c73adb7-3f12-4bdd-a5ab-60951e97428d\">\n<div style=\"position:absolute;width:100.28251%;height:100%;left:-0.14125%;top:0%\" data-leaf-element=\"true\"><amp-img layout=\"fill\" src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2.png\" alt=\"InterviewBit-White-2\" srcSet=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2.png 2130w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-2048x681.png 2048w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-1536x511.png 1536w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-1024x340.png 1024w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-768x255.png 768w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-300x100.png 300w,https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-150x50.png 150w\" sizes=\"(min-width: 1024px) 20vh, 44vw\" disable-inline-width=\"true\"><\/amp-img><\/div>\n<\/div>\n<\/div>\n<div style=\"position:absolute;pointer-events:none;left:7.52427%;top:27.18447%;width:88.34951%;height:32.68608%;opacity:1\">\n<div id=\"anim-cca0d621-5168-40a5-b30c-9419c0da7cdf\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0;--initial-opacity:0;--initial-transform:none\">\n<div id=\"anim-eac36493-a65f-421d-b258-0857562d9f3a\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0;--initial-opacity:1;--initial-transform:translate3d(0px, -211.49618%, 0)\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0\" id=\"el-b1c048a0-b995-4f62-8f59-e9a253eecfc3\">\n<p class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:1.7719780219780208% 0;font-family:&quot;Poppins&quot;,sans-serif;font-size:0.695793em;line-height:1.1;text-align:initial;padding:0;color:#000000\"><span><span style=\"font-weight: 700; color: #fff\">Step Up Your Game with InterviewBit Web Stories<\/span><\/span><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div style=\"position:absolute;pointer-events:none;left:4.85437%;top:4.36893%;width:19.66019%;height:45.79288%;opacity:1\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0\" id=\"el-688d6104-4e44-45b2-9026-a9c8513ff7a1\">\n<h1 id=\"\" class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:49.876543209876516% 0;font-family:&quot;Poppins&quot;,sans-serif;font-size:3.268608em;line-height:1;text-align:initial;padding:0;color:#000000\"><span><span style=\"font-weight: 700; color: #fff\">\u201c<\/span><\/span><\/h1>\n<\/div>\n<\/div>\n<div style=\"position:absolute;pointer-events:none;left:7.28155%;top:59.87055%;width:82.52427%;height:13.26861%;opacity:1\">\n<div id=\"anim-35bd5cb7-85f9-4b1c-98d6-5aaac0c9c793\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0;--initial-opacity:0;--initial-transform:none\">\n<div id=\"anim-d42bab2b-d57e-464d-9022-fb538fbe37ca\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0;--initial-opacity:1;--initial-transform:translate3d(0px, -621.00265%, 0)\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0;border-radius:0.5882352941176471% 0.5882352941176471% 0.5882352941176471% 0.5882352941176471% \/ 2.4390243902439024% 2.4390243902439024% 2.4390243902439024% 2.4390243902439024%\" id=\"el-b2dd71c5-ba5c-4422-b381-46a892720ad6\">\n<h3 id=\"dont-miss-out-on-the-chance-to-upskill-yourself-with-intervewbits-engaging-web-stories\" class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:-0.09512867647058793% 0;font-family:&quot;Roboto&quot;,sans-serif;font-size:0.372168em;line-height:1.2;text-align:left;padding:0;color:#000000\"><span><span style=\"color: #fff\">Don&#8217;t miss out on the chance to upskill yourself with IntervewBit&#8217;s engaging web stories.&nbsp;<\/span><\/span><\/h3>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p><\/amp-story-grid-layer><amp-story-page-outlink layout=\"nodisplay\"><a href=\"https:\/\/www.interviewbit.com\/blog\/web-stories\/?utm_source=Ib&amp;utm_medium=webstories&amp;utm_campaign=unlimited-learning-with-engaging-web-stories\" rel=\"\">SWIPE UP<\/a><\/amp-story-page-outlink><\/amp-story-page><\/amp-story><\/body><\/html><\/p>\n","protected":false},"excerpt":{"rendered":"This web story provide you with step-by-step guide on how to solve any dynamic programming interview question.\n","protected":false},"author":21,"featured_media":17704,"template":"","meta":{"_daextam_enable_autolinks":"","web_stories_products":[],"web_stories_publisher_logo":1082,"web_stories_poster":[]},"web_story_category":[2120],"web_story_tag":[2652],"amp_enabled":false,"story_data":{"version":46,"pages":[{"elements":[{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"x":48,"y":0,"width":330,"height":220,"mask":{"type":"rectangle"},"isBackground":true,"type":"image","id":"45e19ae5-1b9f-44b5-a5b5-36662dd08397","scale":100,"focalX":50,"focalY":50,"resource":{"type":"image","mimeType":"image\/jpeg","width":6000,"height":4000,"sizes":{"full":{"file":"media\/unsplash:LJ9KY8pIH3E","sourceUrl":"https:\/\/images.unsplash.com\/photo-1534972195531-d756b9bfa9f2?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzMHx8aHRtbHxlbnwwfHx8fDE2NzQwNTA3OTQ&ixlib=rb-4.0.3&fm=jpg&w=6000&h=4000&fit=max","mimeType":"image\/jpeg","width":6000,"height":4000},"large":{"file":"media\/unsplash:LJ9KY8pIH3E","sourceUrl":"https:\/\/images.unsplash.com\/photo-1534972195531-d756b9bfa9f2?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzMHx8aHRtbHxlbnwwfHx8fDE2NzQwNTA3OTQ&ixlib=rb-4.0.3&fm=jpg&w=4800&h=3200&fit=max","mimeType":"image\/jpeg","width":4800,"height":3200},"3600_2400":{"file":"media\/unsplash:LJ9KY8pIH3E","sourceUrl":"https:\/\/images.unsplash.com\/photo-1534972195531-d756b9bfa9f2?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzMHx8aHRtbHxlbnwwfHx8fDE2NzQwNTA3OTQ&ixlib=rb-4.0.3&fm=jpg&w=3600&h=2400&fit=max","mimeType":"image\/jpeg","width":3600,"height":2400},"2400_1600":{"file":"media\/unsplash:LJ9KY8pIH3E","sourceUrl":"https:\/\/images.unsplash.com\/photo-1534972195531-d756b9bfa9f2?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzMHx8aHRtbHxlbnwwfHx8fDE2NzQwNTA3OTQ&ixlib=rb-4.0.3&fm=jpg&w=2400&h=1600&fit=max","mimeType":"image\/jpeg","width":2400,"height":1600},"1200_800":{"file":"media\/unsplash:LJ9KY8pIH3E","sourceUrl":"https:\/\/images.unsplash.com\/photo-1534972195531-d756b9bfa9f2?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzMHx8aHRtbHxlbnwwfHx8fDE2NzQwNTA3OTQ&ixlib=rb-4.0.3&fm=jpg&w=1200&h=800&fit=max","mimeType":"image\/jpeg","width":1200,"height":800},"web_stories_thumbnail":{"file":"media\/unsplash:LJ9KY8pIH3E","sourceUrl":"https:\/\/images.unsplash.com\/photo-1534972195531-d756b9bfa9f2?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzMHx8aHRtbHxlbnwwfHx8fDE2NzQwNTA3OTQ&ixlib=rb-4.0.3&fm=jpg&w=340&h=227&fit=max","mimeType":"image\/jpeg","width":340,"height":227}},"isPlaceholder":false,"isExternal":true,"needsProxy":false,"id":"media\/unsplash:LJ9KY8pIH3E","baseColor":"#262626","blurHash":"L47A;|ev%NOEK*xZX9WB4T~CbJoM","creationDate":"2018-08-22T21:16:15Z","src":"https:\/\/images.unsplash.com\/photo-1534972195531-d756b9bfa9f2?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzMHx8aHRtbHxlbnwwfHx8fDE2NzQwNTA3OTQ&ixlib=rb-4.0.3&fm=jpg&w=6000&h=4000&fit=max","alt":"two black flat screen computer monitors","attribution":{"author":{"displayName":"Fotis Fotopoulos","url":"https:\/\/unsplash.com\/pt\/@ffstop?utm_source=web_stories_wordpress&utm_medium=referral"},"registerUsageUrl":"https:\/\/media3p.googleapis.com\/v1\/media:registerUsage?token=AXhJFEcOKM\/7wcT6VsEirypKEMBVuN05BrFffBsEv8cNS57wdKTxHyOsHKwMjbO0So59Sk8TFI2MIZQfQROh5PYspKIwOhkwgUIw8terzPt4udo5OMuYi%2BByQjlGhWmD5x1Bp1nQY\/hNGogXGbBLd5d9uzV5eFQKW7xtm2F49Y4W\/xkwa7PMV17smOxfKy8LDCn8b2u7wn\/EaHxY6GkF0nHjTVyqtLfXVHjWDdEJlQ%3D%3D"}},"overlay":{"color":{"r":0,"g":0,"b":0,"a":0.5}}},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"NONE","font":{"family":"Anton"},"fontSize":35,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":1.5,"textAlign":"left","padding":{"locked":true,"hasHiddenPadding":false,"horizontal":0,"vertical":0},"content":"<span style=\"color: #fff\">Follow&nbsp;these steps&nbsp;to solve&nbsp;any<\/span>","borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"x":11,"y":380,"width":372,"height":105,"tagName":"p","basedOn":"18e3d99a-85c3-40cb-af0f-4ff55fe3eaa6","id":"700653a1-7c6f-4229-9a9d-40d583cd443c","type":"text"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"scale":100,"focalX":50,"focalY":50,"resource":{"type":"image","mimeType":"image\/png","creationDate":"2021-07-12T14:57:03","src":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2.png","width":2130,"height":708,"id":724,"alt":"InterviewBit-White-2","sizes":{"medium":{"file":"InterviewBit-White-2-300x100.png","width":300,"height":100,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-300x100.png"},"large":{"file":"InterviewBit-White-2-1024x340.png","width":1024,"height":340,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-1024x340.png"},"thumbnail":{"file":"InterviewBit-White-2-150x150.png","width":150,"height":150,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-150x150.png"},"medium_large":{"file":"InterviewBit-White-2-768x255.png","width":768,"height":255,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-768x255.png"},"1536x1536":{"file":"InterviewBit-White-2-1536x511.png","width":1536,"height":511,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-1536x511.png"},"2048x2048":{"file":"InterviewBit-White-2-2048x681.png","width":2048,"height":681,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-2048x681.png"},"web-stories-poster-portrait":{"file":"InterviewBit-White-2-640x708.png","width":640,"height":708,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-640x708.png"},"web-stories-poster-landscape":{"file":"InterviewBit-White-2-853x640.png","width":853,"height":640,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-853x640.png"},"web-stories-poster-square":{"file":"InterviewBit-White-2-640x640.png","width":640,"height":640,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-640x640.png"},"web-stories-publisher-logo":{"file":"InterviewBit-White-2-96x96.png","width":96,"height":96,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-96x96.png"},"web-stories-thumbnail":{"file":"InterviewBit-White-2-150x50.png","width":150,"height":50,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-150x50.png"},"full":{"file":"InterviewBit-White-2.png","width":2130,"height":708,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2.png"}},"isOptimized":false,"isExternal":false},"x":-3,"y":-40,"width":180,"height":60,"mask":{"type":"rectangle"},"basedOn":"ea251a16-bb73-4d60-8d67-8b48c3a5f099","id":"cb48c127-3fe1-4225-9f7c-cff7090fd555","type":"image"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"NONE","font":{"family":"Anton"},"fontSize":50,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":1.2,"textAlign":"left","padding":{"locked":true,"hasHiddenPadding":false,"horizontal":0,"vertical":0},"type":"text","content":"<span style=\"color: #347eff\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dynamic Programming Interview Problem<\/span>","borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"x":11,"y":416,"width":382,"height":195,"id":"1b8f9b5c-1a18-4ce1-9c5f-06d030451937"}],"backgroundColor":{"color":{"r":255,"g":255,"b":255}},"id":"e8de3bd0-50f1-44e6-a934-453d1980d163","defaultBackgroundElement":{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"x":1,"y":1,"width":1,"height":1,"mask":{"type":"rectangle"},"isBackground":true,"isDefaultBackground":true,"type":"shape","id":"5ec7481f-587c-4959-a7da-bd02c94e7e1c"},"animations":[{"targets":["700653a1-7c6f-4229-9a9d-40d583cd443c"],"id":"59c5e0d6-51ac-46bc-8d4d-c8bc55fda118","type":"effect-fly-in","flyInDir":"topToBottom","duration":600,"delay":0}],"pageAttachment":{"url":""}},{"elements":[{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"x":48,"y":0,"width":330,"height":494,"mask":{"type":"rectangle"},"isBackground":true,"type":"image","id":"1189e1b6-be4f-4d45-b46f-5e1b0a59a486","scale":100,"focalX":50,"focalY":50.048436523201,"resource":{"type":"image","mimeType":"image\/jpeg","width":5304,"height":7952,"sizes":{"full":{"file":"media\/unsplash:MChSQHxGZrQ","sourceUrl":"https:\/\/images.unsplash.com\/photo-1521737711867-e3b97375f902?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxNHx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY3MzY4NzQwNg&ixlib=rb-4.0.3&fm=jpg&w=5304&h=7952&fit=max","mimeType":"image\/jpeg","width":5304,"height":7952},"large":{"file":"media\/unsplash:MChSQHxGZrQ","sourceUrl":"https:\/\/images.unsplash.com\/photo-1521737711867-e3b97375f902?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxNHx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY3MzY4NzQwNg&ixlib=rb-4.0.3&fm=jpg&w=4243&h=6361&fit=max","mimeType":"image\/jpeg","width":4243,"height":6361},"3182_4771":{"file":"media\/unsplash:MChSQHxGZrQ","sourceUrl":"https:\/\/images.unsplash.com\/photo-1521737711867-e3b97375f902?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxNHx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY3MzY4NzQwNg&ixlib=rb-4.0.3&fm=jpg&w=3182&h=4771&fit=max","mimeType":"image\/jpeg","width":3182,"height":4771},"2121_3180":{"file":"media\/unsplash:MChSQHxGZrQ","sourceUrl":"https:\/\/images.unsplash.com\/photo-1521737711867-e3b97375f902?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxNHx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY3MzY4NzQwNg&ixlib=rb-4.0.3&fm=jpg&w=2121&h=3180&fit=max","mimeType":"image\/jpeg","width":2121,"height":3180},"1060_1589":{"file":"media\/unsplash:MChSQHxGZrQ","sourceUrl":"https:\/\/images.unsplash.com\/photo-1521737711867-e3b97375f902?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxNHx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY3MzY4NzQwNg&ixlib=rb-4.0.3&fm=jpg&w=1060&h=1589&fit=max","mimeType":"image\/jpeg","width":1060,"height":1589},"web_stories_thumbnail":{"file":"media\/unsplash:MChSQHxGZrQ","sourceUrl":"https:\/\/images.unsplash.com\/photo-1521737711867-e3b97375f902?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxNHx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY3MzY4NzQwNg&ixlib=rb-4.0.3&fm=jpg&w=340&h=510&fit=max","mimeType":"image\/jpeg","width":340,"height":510}},"isPlaceholder":false,"isExternal":true,"needsProxy":false,"id":"media\/unsplash:MChSQHxGZrQ","baseColor":"#c0c0c0","blurHash":"LOE2@8t7%g-;~WoftS%MWUWAozoz","creationDate":"2018-03-22T16:56:54Z","src":"https:\/\/images.unsplash.com\/photo-1521737711867-e3b97375f902?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxNHx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY3MzY4NzQwNg&ixlib=rb-4.0.3&fm=jpg&w=5304&h=7952&fit=max","alt":"men sitting in front of their laptop computer","attribution":{"author":{"displayName":"Annie Spratt","url":"https:\/\/unsplash.com\/@anniespratt?utm_source=web_stories_wordpress&utm_medium=referral"},"registerUsageUrl":"https:\/\/media3p.googleapis.com\/v1\/media:registerUsage?token=AXhJFEfUJJczOap2Rz\/\/FJhCfsFXEYGLqzA13otRn\/eBSjKIPenDN2bRN8m%2BMIUGX28EKoDL8Fi%2Bn4jVDeYRVubSuOL0cxPF2JXj5pubRr5nYLJhCohqAHY6JMxNBGuzdqM\/YPCnwJJqcQwbptT8kReJ7WoG4rWelFznXGqx2wyNrCUoDfKamDAkIPny7Cg1aFfJ5MBOpUyjuffu7ZJQER8BLGbujgKKDJ2P38WrINbpJgrOvrUoBP8AEQYpFkuUzx0dboKX"}},"overlay":{"color":{"r":0,"g":0,"b":0,"a":0.5}}},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":false,"backgroundColor":{"color":{"r":18,"g":99,"b":255,"a":0.5}},"x":-66,"y":328,"basedOn":"e2a86e16-6425-4616-8487-9d748a526332","width":575,"height":223,"mask":{"type":"rectangle"},"groupId":null,"id":"a881fc6a-7d42-46fe-89c7-57804b528a23","type":"shape"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"scale":100,"focalX":50,"focalY":50,"resource":{"type":"image","mimeType":"image\/png","creationDate":"2021-07-12T14:57:03","src":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2.png","width":2130,"height":708,"id":724,"alt":"InterviewBit-White-2","sizes":{"medium":{"file":"InterviewBit-White-2-300x100.png","width":300,"height":100,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-300x100.png"},"large":{"file":"InterviewBit-White-2-1024x340.png","width":1024,"height":340,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-1024x340.png"},"thumbnail":{"file":"InterviewBit-White-2-150x150.png","width":150,"height":150,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-150x150.png"},"medium_large":{"file":"InterviewBit-White-2-768x255.png","width":768,"height":255,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-768x255.png"},"1536x1536":{"file":"InterviewBit-White-2-1536x511.png","width":1536,"height":511,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-1536x511.png"},"2048x2048":{"file":"InterviewBit-White-2-2048x681.png","width":2048,"height":681,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-2048x681.png"},"web-stories-poster-portrait":{"file":"InterviewBit-White-2-640x708.png","width":640,"height":708,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-640x708.png"},"web-stories-poster-landscape":{"file":"InterviewBit-White-2-853x640.png","width":853,"height":640,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-853x640.png"},"web-stories-poster-square":{"file":"InterviewBit-White-2-640x640.png","width":640,"height":640,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-640x640.png"},"web-stories-publisher-logo":{"file":"InterviewBit-White-2-96x96.png","width":96,"height":96,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-96x96.png"},"web-stories-thumbnail":{"file":"InterviewBit-White-2-150x50.png","width":150,"height":50,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-150x50.png"},"full":{"file":"InterviewBit-White-2.png","width":2130,"height":708,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2.png"}},"isOptimized":false,"isExternal":false},"x":-3,"y":-40,"width":180,"height":60,"mask":{"type":"rectangle"},"basedOn":"cb48c127-3fe1-4225-9f7c-cff7090fd555","id":"81811408-af93-46a4-9620-651285eea9d8","type":"image"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"NONE","font":{"family":"Roboto"},"fontSize":20,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":1.2,"textAlign":"center","padding":{"locked":true,"hasHiddenPadding":false,"horizontal":0,"vertical":0},"content":"<span style=\"font-weight: 700; color: #fff\">Ready to crack DP interviews with ease?<\/span>","borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"x":3,"y":563,"width":404,"height":23,"basedOn":"8a0708a2-447a-461e-9a13-31c6560c5214","id":"54daed4f-c8c4-4719-9942-2809033db776","type":"text"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"NONE","font":{"family":"Darker Grotesque"},"fontSize":28,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":1,"textAlign":"initial","padding":{"locked":true,"hasHiddenPadding":false,"horizontal":0,"vertical":0},"content":"<span style=\"color: #fff\">DP is an essential topic for coding interviews, &amp; mastering it can take your career to new heights. Are you struggling with DP interview questions?&nbsp;Let's explpre how to solve the DP problem -&gt;<\/span>","borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"x":29,"y":343,"width":354,"height":178,"tagName":"p","basedOn":"5bc92ad7-5298-4033-b5ea-f06daf81a5a9","id":"cfca1c02-e711-4541-8f4f-1ccbec4bcde6","type":"text"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"NONE","font":{"family":"Roboto"},"fontSize":30,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":1.2,"textAlign":"left","padding":{"locked":true,"hasHiddenPadding":false,"horizontal":0,"vertical":0},"type":"text","content":"<span style=\"font-weight: 700; color: #fff\">Introduction to Dynamic Programming<\/span>","borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"x":27,"y":243,"width":355,"height":71,"id":"b7ad6fc6-7f2c-436e-8356-cd324d012573"}],"backgroundColor":{"color":{"r":255,"g":255,"b":255}},"animations":[{"id":"c1c7532b-e9b4-425a-92e0-cd2d5574d438","type":"effect-background-pan-and-zoom","panDir":"rightToLeft","duration":2000,"delay":0,"zoomDirection":"scaleOut","targets":["1189e1b6-be4f-4d45-b46f-5e1b0a59a486"]},{"targets":["cfca1c02-e711-4541-8f4f-1ccbec4bcde6"],"id":"f0a78883-ac8c-4e4b-bf7f-f4520cda64d1","type":"effect-fly-in","flyInDir":"topToBottom","duration":600,"delay":0}],"id":"8c6bf4ec-2231-4205-afc1-feff529ae9f3","defaultBackgroundElement":{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"x":1,"y":1,"width":1,"height":1,"mask":{"type":"rectangle"},"isBackground":true,"isDefaultBackground":true,"type":"shape","id":"7806bdba-264d-47f5-b39e-c0936371be43"},"pageAttachment":{"url":"https:\/\/www.interviewbit.com\/courses\/programming\/dynamic-programming\/?utm_source=ib&utm_medium=webstories&utm_campaign=how-to-solve-any-dynamic-programming-interview-question","icon":"https:\/\/assets.interviewbit.com\/assets\/ib-logo-904db47f8d2208f21a168bfe4851e0fdcc041f2487b6a8ec0b181d3724dbd012.png.gz","needsProxy":false,"ctaText":"Explore now"}},{"elements":[{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"x":48,"y":0,"width":330,"height":494,"mask":{"type":"rectangle"},"isBackground":true,"type":"image","id":"1189e1b6-be4f-4d45-b46f-5e1b0a59a486","scale":100,"focalX":50,"focalY":49.94818649167432,"resource":{"baseColor":"#f3f3f3","blurHash":"LlH.QcIAxut7~qayt7xu?bt7M{xv","type":"image","mimeType":"image\/jpeg","creationDate":"2019-11-11T18:11:53Z","src":"https:\/\/images.unsplash.com\/photo-1573495783323-9e59a325d4b4?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw3MHx8ZGV2ZWxvcGVyc3xlbnwwfHx8fDE2NjQ0NjYzNjE&ixlib=rb-1.2.1&fm=jpg&w=4016&h=6016&fit=max","width":4016,"height":6016,"id":"media\/unsplash:7RRj4wDX7LE","alt":"shallow focus photo of woman using MacBook","sizes":{"full":{"file":"media\/unsplash:7RRj4wDX7LE","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573495783323-9e59a325d4b4?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw3MHx8ZGV2ZWxvcGVyc3xlbnwwfHx8fDE2NjQ0NjYzNjE&ixlib=rb-1.2.1&fm=jpg&w=4016&h=6016&fit=max","mimeType":"image\/jpeg","width":4016,"height":6016},"large":{"file":"media\/unsplash:7RRj4wDX7LE","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573495783323-9e59a325d4b4?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw3MHx8ZGV2ZWxvcGVyc3xlbnwwfHx8fDE2NjQ0NjYzNjE&ixlib=rb-1.2.1&fm=jpg&w=3212&h=4812&fit=max","mimeType":"image\/jpeg","width":3212,"height":4812},"2409_3609":{"file":"media\/unsplash:7RRj4wDX7LE","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573495783323-9e59a325d4b4?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw3MHx8ZGV2ZWxvcGVyc3xlbnwwfHx8fDE2NjQ0NjYzNjE&ixlib=rb-1.2.1&fm=jpg&w=2409&h=3609&fit=max","mimeType":"image\/jpeg","width":2409,"height":3609},"1606_2406":{"file":"media\/unsplash:7RRj4wDX7LE","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573495783323-9e59a325d4b4?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw3MHx8ZGV2ZWxvcGVyc3xlbnwwfHx8fDE2NjQ0NjYzNjE&ixlib=rb-1.2.1&fm=jpg&w=1606&h=2406&fit=max","mimeType":"image\/jpeg","width":1606,"height":2406},"803_1203":{"file":"media\/unsplash:7RRj4wDX7LE","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573495783323-9e59a325d4b4?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw3MHx8ZGV2ZWxvcGVyc3xlbnwwfHx8fDE2NjQ0NjYzNjE&ixlib=rb-1.2.1&fm=jpg&w=803&h=1203&fit=max","mimeType":"image\/jpeg","width":803,"height":1203},"web_stories_thumbnail":{"file":"media\/unsplash:7RRj4wDX7LE","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573495783323-9e59a325d4b4?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw3MHx8ZGV2ZWxvcGVyc3xlbnwwfHx8fDE2NjQ0NjYzNjE&ixlib=rb-1.2.1&fm=jpg&w=340&h=509&fit=max","mimeType":"image\/jpeg","width":340,"height":509}},"attribution":{"author":{"displayName":"Christina @ wocintechchat.com","url":"https:\/\/unsplash.com\/@wocintechchat?utm_source=web_stories_wordpress&utm_medium=referral"},"registerUsageUrl":"https:\/\/media3p.googleapis.com\/v1\/media:registerUsage?token=AQBR4tqCqy1VrA\/87Yw3PZrAhYUH9prxWhFxKYzgdgwwbBc2sKEhWj1KqeYYnpwtpfNLRUmN85o29gdyzJhA0ziDin13VcYXiyHJF77LNsqROK88a%2BysiA%2BErvBQxWGn14exo0ZlthVJjYYEjSDCPyLrtGYqaFzzQ1LFOfSCwLNVWZan\/JTQZeFCYRA2AjAuR%2BzlyieLBo2n4SyKTzcyUs3b%2B7m1EX3Fwj%2BJTnx\/DOYwEe064phd"},"isPlaceholder":false,"isOptimized":false,"isMuted":false,"isExternal":true,"needsProxy":false},"overlay":{"color":{"r":0,"g":0,"b":0,"a":0.5}}},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":false,"backgroundColor":{"color":{"r":18,"g":99,"b":255,"a":0.5}},"x":-66,"y":328,"basedOn":"e2a86e16-6425-4616-8487-9d748a526332","width":575,"height":223,"mask":{"type":"rectangle"},"groupId":null,"id":"fab3d0ab-11ec-41b6-95e6-21f14fa79e04","type":"shape"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"scale":100,"focalX":50,"focalY":50,"resource":{"type":"image","mimeType":"image\/png","creationDate":"2021-07-12T14:57:03","src":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2.png","width":2130,"height":708,"id":724,"alt":"InterviewBit-White-2","sizes":{"medium":{"file":"InterviewBit-White-2-300x100.png","width":300,"height":100,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-300x100.png"},"large":{"file":"InterviewBit-White-2-1024x340.png","width":1024,"height":340,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-1024x340.png"},"thumbnail":{"file":"InterviewBit-White-2-150x150.png","width":150,"height":150,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-150x150.png"},"medium_large":{"file":"InterviewBit-White-2-768x255.png","width":768,"height":255,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-768x255.png"},"1536x1536":{"file":"InterviewBit-White-2-1536x511.png","width":1536,"height":511,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-1536x511.png"},"2048x2048":{"file":"InterviewBit-White-2-2048x681.png","width":2048,"height":681,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-2048x681.png"},"web-stories-poster-portrait":{"file":"InterviewBit-White-2-640x708.png","width":640,"height":708,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-640x708.png"},"web-stories-poster-landscape":{"file":"InterviewBit-White-2-853x640.png","width":853,"height":640,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-853x640.png"},"web-stories-poster-square":{"file":"InterviewBit-White-2-640x640.png","width":640,"height":640,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-640x640.png"},"web-stories-publisher-logo":{"file":"InterviewBit-White-2-96x96.png","width":96,"height":96,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-96x96.png"},"web-stories-thumbnail":{"file":"InterviewBit-White-2-150x50.png","width":150,"height":50,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-150x50.png"},"full":{"file":"InterviewBit-White-2.png","width":2130,"height":708,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2.png"}},"isOptimized":false,"isExternal":false},"x":-3,"y":-40,"width":180,"height":60,"mask":{"type":"rectangle"},"basedOn":"81811408-af93-46a4-9620-651285eea9d8","id":"46d88c1c-7a43-4355-acc1-3a75a4e5a0cc","type":"image"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"NONE","font":{"family":"Darker Grotesque"},"fontSize":28,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":1,"textAlign":"initial","padding":{"locked":true,"hasHiddenPadding":false,"horizontal":0,"vertical":0},"content":"<span style=\"font-weight: 700; color: #fff\">1. Recognize the beast&nbsp;<\/span>\n\n<span style=\"color: #fff\">DP problems have a distinct pattern. Look for keywords like \"minimum\/maximum\" or \"longest\/shortest.\" Recognizing the problem is the first step toward solving it.<\/span>","borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"x":29,"y":277,"width":354,"height":234,"tagName":"p","basedOn":"c50f6b9e-0066-42b4-a2a2-6352ea416e04","id":"5bc92ad7-5298-4033-b5ea-f06daf81a5a9","type":"text"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"NONE","font":{"family":"Roboto"},"fontSize":20,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":1.2,"textAlign":"center","padding":{"locked":true,"hasHiddenPadding":false,"horizontal":0,"vertical":0},"content":"<span style=\"font-weight: 700; color: #fff\">Ready to crack DP interviews with ease?<\/span>","borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"x":3,"y":563,"width":404,"height":23,"basedOn":"54daed4f-c8c4-4719-9942-2809033db776","id":"613d7420-7aa1-4c3f-b550-8763aabc1665","type":"text"}],"backgroundColor":{"color":{"r":255,"g":255,"b":255}},"animations":[{"targets":["5bc92ad7-5298-4033-b5ea-f06daf81a5a9"],"id":"b057bce7-6f6a-452f-b0f1-159d7305965b","type":"effect-fly-in","flyInDir":"topToBottom","duration":600,"delay":0},{"id":"8f62c001-433b-4b52-be4c-01eaaf97171d","type":"effect-background-pan-and-zoom","panDir":"rightToLeft","duration":2000,"delay":0,"zoomDirection":"scaleOut","targets":["1189e1b6-be4f-4d45-b46f-5e1b0a59a486"]}],"id":"40e238c0-cd08-4923-bd94-e7fbdf785fcb","defaultBackgroundElement":{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"x":1,"y":1,"width":1,"height":1,"mask":{"type":"rectangle"},"isBackground":true,"isDefaultBackground":true,"type":"shape","id":"6417e2e4-880c-4959-9e6c-834fe69f9dd6"},"pageAttachment":{"url":"https:\/\/www.interviewbit.com\/courses\/programming\/dynamic-programming\/?utm_source=ib&utm_medium=webstories&utm_campaign=how-to-solve-any-dynamic-programming-interview-question","icon":"https:\/\/assets.interviewbit.com\/assets\/ib-logo-904db47f8d2208f21a168bfe4851e0fdcc041f2487b6a8ec0b181d3724dbd012.png.gz","needsProxy":false,"ctaText":"Explore now"}},{"elements":[{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"x":48,"y":0,"width":330,"height":494,"mask":{"type":"rectangle"},"isBackground":true,"type":"image","id":"6417e2e4-880c-4959-9e6c-834fe69f9dd6","scale":100,"focalX":50,"focalY":50,"resource":{"type":"image","mimeType":"image\/jpeg","width":4000,"height":6000,"sizes":{"full":{"file":"media\/unsplash:D4LDw5eXhgg","sourceUrl":"https:\/\/images.unsplash.com\/photo-1579226905180-636b76d96082?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxNHx8bWFwJTIwd2l0aCUyMGxhcHRvcHxlbnwwfHx8fDE2NzY5MDYyMTQ&ixlib=rb-4.0.3&fm=jpg&w=4000&h=6000&fit=max","mimeType":"image\/jpeg","width":4000,"height":6000},"large":{"file":"media\/unsplash:D4LDw5eXhgg","sourceUrl":"https:\/\/images.unsplash.com\/photo-1579226905180-636b76d96082?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxNHx8bWFwJTIwd2l0aCUyMGxhcHRvcHxlbnwwfHx8fDE2NzY5MDYyMTQ&ixlib=rb-4.0.3&fm=jpg&w=3200&h=4800&fit=max","mimeType":"image\/jpeg","width":3200,"height":4800},"2400_3600":{"file":"media\/unsplash:D4LDw5eXhgg","sourceUrl":"https:\/\/images.unsplash.com\/photo-1579226905180-636b76d96082?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxNHx8bWFwJTIwd2l0aCUyMGxhcHRvcHxlbnwwfHx8fDE2NzY5MDYyMTQ&ixlib=rb-4.0.3&fm=jpg&w=2400&h=3600&fit=max","mimeType":"image\/jpeg","width":2400,"height":3600},"1600_2400":{"file":"media\/unsplash:D4LDw5eXhgg","sourceUrl":"https:\/\/images.unsplash.com\/photo-1579226905180-636b76d96082?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxNHx8bWFwJTIwd2l0aCUyMGxhcHRvcHxlbnwwfHx8fDE2NzY5MDYyMTQ&ixlib=rb-4.0.3&fm=jpg&w=1600&h=2400&fit=max","mimeType":"image\/jpeg","width":1600,"height":2400},"800_1200":{"file":"media\/unsplash:D4LDw5eXhgg","sourceUrl":"https:\/\/images.unsplash.com\/photo-1579226905180-636b76d96082?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxNHx8bWFwJTIwd2l0aCUyMGxhcHRvcHxlbnwwfHx8fDE2NzY5MDYyMTQ&ixlib=rb-4.0.3&fm=jpg&w=800&h=1200&fit=max","mimeType":"image\/jpeg","width":800,"height":1200},"web_stories_thumbnail":{"file":"media\/unsplash:D4LDw5eXhgg","sourceUrl":"https:\/\/images.unsplash.com\/photo-1579226905180-636b76d96082?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxNHx8bWFwJTIwd2l0aCUyMGxhcHRvcHxlbnwwfHx8fDE2NzY5MDYyMTQ&ixlib=rb-4.0.3&fm=jpg&w=340&h=510&fit=max","mimeType":"image\/jpeg","width":340,"height":510}},"isPlaceholder":false,"isExternal":true,"needsProxy":false,"id":"media\/unsplash:D4LDw5eXhgg","baseColor":"#260c0c","blurHash":"LA8W]a%h4oDiNIIpoJ%20KM{?H%M","creationDate":"2020-01-17T02:09:19Z","src":"https:\/\/images.unsplash.com\/photo-1579226905180-636b76d96082?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxNHx8bWFwJTIwd2l0aCUyMGxhcHRvcHxlbnwwfHx8fDE2NzY5MDYyMTQ&ixlib=rb-4.0.3&fm=jpg&w=4000&h=6000&fit=max","alt":"man sitting in front of the MacBook Pro","attribution":{"author":{"displayName":"Adam Nowakowski","url":"https:\/\/unsplash.com\/pt-br\/@adamaszczos?utm_source=web_stories_wordpress&utm_medium=referral"},"registerUsageUrl":"https:\/\/media3p.googleapis.com\/v1\/media:registerUsage?token=Aa0pnNaS1FrdttjAzfDZHeFbUQT4qsnlEQ3VoLTBJLzLheIb2\/GZUfhQ4ByITtGHKYCivwFLygnOOeVB2AcJNAwhOL3EeiSS7pM2RaAGq4ERqq\/DjGRrECYwvFwqFIKWbMF8BS%2BwIjn6yf3UGsU%2BmFjxUX89YN6GWYve\/fyI0yxwfJ0l%2BoH1pCNk1aREr3wTKtSlOqaUoTbjqsS7ecv%2BDWXN1qwy1PzFym9GoONOy7x%2BvoOZnw7FP0jiuqJihvJnGWJd"}},"overlay":{"color":{"r":0,"g":0,"b":0,"a":0.5}}},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":false,"backgroundColor":{"color":{"r":18,"g":99,"b":255,"a":0.5}},"x":-66,"y":328,"basedOn":"fab3d0ab-11ec-41b6-95e6-21f14fa79e04","width":575,"height":223,"mask":{"type":"rectangle"},"groupId":null,"id":"59f83619-8945-4050-b9ea-7da34f150cf9","type":"shape"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"scale":100,"focalX":50,"focalY":50,"resource":{"type":"image","mimeType":"image\/png","creationDate":"2021-07-12T14:57:03","src":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2.png","width":2130,"height":708,"id":724,"alt":"InterviewBit-White-2","sizes":{"medium":{"file":"InterviewBit-White-2-300x100.png","width":300,"height":100,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-300x100.png"},"large":{"file":"InterviewBit-White-2-1024x340.png","width":1024,"height":340,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-1024x340.png"},"thumbnail":{"file":"InterviewBit-White-2-150x150.png","width":150,"height":150,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-150x150.png"},"medium_large":{"file":"InterviewBit-White-2-768x255.png","width":768,"height":255,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-768x255.png"},"1536x1536":{"file":"InterviewBit-White-2-1536x511.png","width":1536,"height":511,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-1536x511.png"},"2048x2048":{"file":"InterviewBit-White-2-2048x681.png","width":2048,"height":681,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-2048x681.png"},"web-stories-poster-portrait":{"file":"InterviewBit-White-2-640x708.png","width":640,"height":708,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-640x708.png"},"web-stories-poster-landscape":{"file":"InterviewBit-White-2-853x640.png","width":853,"height":640,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-853x640.png"},"web-stories-poster-square":{"file":"InterviewBit-White-2-640x640.png","width":640,"height":640,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-640x640.png"},"web-stories-publisher-logo":{"file":"InterviewBit-White-2-96x96.png","width":96,"height":96,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-96x96.png"},"web-stories-thumbnail":{"file":"InterviewBit-White-2-150x50.png","width":150,"height":50,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-150x50.png"},"full":{"file":"InterviewBit-White-2.png","width":2130,"height":708,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2.png"}},"isOptimized":false,"isExternal":false},"x":-3,"y":-40,"width":180,"height":60,"mask":{"type":"rectangle"},"basedOn":"46d88c1c-7a43-4355-acc1-3a75a4e5a0cc","id":"b5cf3d24-52ce-4d75-9e43-2bd8784e2509","type":"image"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"NONE","font":{"family":"Darker Grotesque"},"fontSize":28,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":1,"textAlign":"initial","padding":{"locked":true,"hasHiddenPadding":false,"horizontal":0,"vertical":0},"content":"<span style=\"font-weight: 700; color: #fff\">2. Variables, Variables Everywhere<\/span><span style=\"color: #fff\">&nbsp;<\/span>\n\n<span style=\"color: #fff\">Identify the variables in the problem. They could be anything from indices to the size of the input. Knowing the variables will help you write the recurrence relation.<\/span>","borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"x":29,"y":250,"width":354,"height":262,"tagName":"p","basedOn":"5bc92ad7-5298-4033-b5ea-f06daf81a5a9","id":"b6c8eb7e-db8d-4473-a088-51c52cf0a2cd","type":"text"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"NONE","font":{"family":"Roboto"},"fontSize":20,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":1.2,"textAlign":"center","padding":{"locked":true,"hasHiddenPadding":false,"horizontal":0,"vertical":0},"content":"<span style=\"font-weight: 700; color: #fff\">Ready to crack DP interviews with ease?<\/span>","borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"x":3,"y":563,"width":404,"height":23,"basedOn":"54daed4f-c8c4-4719-9942-2809033db776","id":"adf99b9f-b603-4777-bf85-3180bba0ad39","type":"text"}],"backgroundColor":{"color":{"r":255,"g":255,"b":255}},"animations":[{"id":"dd485c2b-7907-4c2c-a7b0-141b2aac1fd8","type":"effect-background-pan-and-zoom","panDir":"rightToLeft","duration":2000,"delay":0,"zoomDirection":"scaleOut","targets":["6417e2e4-880c-4959-9e6c-834fe69f9dd6"]},{"targets":["b6c8eb7e-db8d-4473-a088-51c52cf0a2cd"],"id":"93108fab-f16b-4321-b03d-f272389f3f51","type":"effect-fly-in","flyInDir":"topToBottom","duration":600,"delay":0}],"id":"95903fc4-ab54-43ff-8549-b530094a70d1","defaultBackgroundElement":{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"x":1,"y":1,"width":1,"height":1,"mask":{"type":"rectangle"},"isBackground":true,"isDefaultBackground":true,"type":"shape","id":"7dae3820-97aa-417e-ad01-99cd25e260d5"},"pageAttachment":{"url":"https:\/\/www.interviewbit.com\/courses\/programming\/dynamic-programming\/?utm_source=ib&utm_medium=webstories&utm_campaign=how-to-solve-any-dynamic-programming-interview-question","icon":"","needsProxy":false,"ctaText":"Explore now"}},{"elements":[{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"x":48,"y":0,"width":330,"height":494,"mask":{"type":"rectangle"},"isBackground":true,"type":"image","id":"741b80be-f1e4-4e7e-81a1-3f452436e27f","scale":100,"focalX":50,"focalY":50,"resource":{"type":"image","mimeType":"image\/jpeg","width":6630,"height":9940,"sizes":{"full":{"file":"media\/unsplash:3cx_tx4h9oI","sourceUrl":"https:\/\/images.unsplash.com\/photo-1581087724844-037b13e16b0b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw5Nnx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjc2MDUxOTAz&ixlib=rb-4.0.3&fm=jpg&w=6630&h=9940&fit=max","mimeType":"image\/jpeg","width":6630,"height":9940},"large":{"file":"media\/unsplash:3cx_tx4h9oI","sourceUrl":"https:\/\/images.unsplash.com\/photo-1581087724844-037b13e16b0b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw5Nnx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjc2MDUxOTAz&ixlib=rb-4.0.3&fm=jpg&w=5304&h=7952&fit=max","mimeType":"image\/jpeg","width":5304,"height":7952},"3978_5964":{"file":"media\/unsplash:3cx_tx4h9oI","sourceUrl":"https:\/\/images.unsplash.com\/photo-1581087724844-037b13e16b0b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw5Nnx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjc2MDUxOTAz&ixlib=rb-4.0.3&fm=jpg&w=3978&h=5964&fit=max","mimeType":"image\/jpeg","width":3978,"height":5964},"2652_3976":{"file":"media\/unsplash:3cx_tx4h9oI","sourceUrl":"https:\/\/images.unsplash.com\/photo-1581087724844-037b13e16b0b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw5Nnx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjc2MDUxOTAz&ixlib=rb-4.0.3&fm=jpg&w=2652&h=3976&fit=max","mimeType":"image\/jpeg","width":2652,"height":3976},"1326_1988":{"file":"media\/unsplash:3cx_tx4h9oI","sourceUrl":"https:\/\/images.unsplash.com\/photo-1581087724844-037b13e16b0b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw5Nnx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjc2MDUxOTAz&ixlib=rb-4.0.3&fm=jpg&w=1326&h=1988&fit=max","mimeType":"image\/jpeg","width":1326,"height":1988},"web_stories_thumbnail":{"file":"media\/unsplash:3cx_tx4h9oI","sourceUrl":"https:\/\/images.unsplash.com\/photo-1581087724844-037b13e16b0b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw5Nnx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjc2MDUxOTAz&ixlib=rb-4.0.3&fm=jpg&w=340&h=510&fit=max","mimeType":"image\/jpeg","width":340,"height":510}},"isPlaceholder":false,"isExternal":true,"needsProxy":false,"id":"media\/unsplash:3cx_tx4h9oI","baseColor":"#f3d9d9","blurHash":"LhHn?As.S5WB01RkjZRj?ajuM{of","creationDate":"2020-02-07T15:17:48Z","src":"https:\/\/images.unsplash.com\/photo-1581087724844-037b13e16b0b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw5Nnx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjc2MDUxOTAz&ixlib=rb-4.0.3&fm=jpg&w=6630&h=9940&fit=max","alt":"woman in black shirt using computer","attribution":{"author":{"displayName":"ThisisEngineering RAEng","url":"https:\/\/unsplash.com\/@thisisengineering?utm_source=web_stories_wordpress&utm_medium=referral"},"registerUsageUrl":"https:\/\/media3p.googleapis.com\/v1\/media:registerUsage?token=Aa0pnNYGAEI8dBOa\/XhnwEN0oVSUeSXagPFTrRWS6aLG\/MkM\/C6%2B5bBnuELiPLLeTeRCuitDJqjWNaBRyCOTJVKdR7uW1uODxG9l6k8PmOuYnLVw%2Bz1CvGGqi\/45OCAAjW%2BFyL5C8fk3dQudbdnhYTJRlf5EI\/oJxPYEGzoZroo38YM6MiMSldfeb31H6FVV2F95o9z6\/xnnQ3YEm2n%2BGCIdDJB2UAdl1D%2BteNtT5DV6dt6knPgnfytiCqiPHnLbuVixZQ%3D%3D"}},"overlay":{"color":{"r":0,"g":0,"b":0,"a":0.5}}},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":false,"backgroundColor":{"color":{"r":18,"g":99,"b":255,"a":0.5}},"x":-66,"y":328,"basedOn":"e2a86e16-6425-4616-8487-9d748a526332","width":575,"height":223,"mask":{"type":"rectangle"},"groupId":null,"id":"27e02540-31d4-4d48-b516-d77a39796e88","type":"shape"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"scale":100,"focalX":50,"focalY":50,"resource":{"type":"image","mimeType":"image\/png","creationDate":"2021-07-12T14:57:03","src":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2.png","width":2130,"height":708,"id":724,"alt":"InterviewBit-White-2","sizes":{"medium":{"file":"InterviewBit-White-2-300x100.png","width":300,"height":100,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-300x100.png"},"large":{"file":"InterviewBit-White-2-1024x340.png","width":1024,"height":340,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-1024x340.png"},"thumbnail":{"file":"InterviewBit-White-2-150x150.png","width":150,"height":150,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-150x150.png"},"medium_large":{"file":"InterviewBit-White-2-768x255.png","width":768,"height":255,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-768x255.png"},"1536x1536":{"file":"InterviewBit-White-2-1536x511.png","width":1536,"height":511,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-1536x511.png"},"2048x2048":{"file":"InterviewBit-White-2-2048x681.png","width":2048,"height":681,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-2048x681.png"},"web-stories-poster-portrait":{"file":"InterviewBit-White-2-640x708.png","width":640,"height":708,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-640x708.png"},"web-stories-poster-landscape":{"file":"InterviewBit-White-2-853x640.png","width":853,"height":640,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-853x640.png"},"web-stories-poster-square":{"file":"InterviewBit-White-2-640x640.png","width":640,"height":640,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-640x640.png"},"web-stories-publisher-logo":{"file":"InterviewBit-White-2-96x96.png","width":96,"height":96,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-96x96.png"},"web-stories-thumbnail":{"file":"InterviewBit-White-2-150x50.png","width":150,"height":50,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-150x50.png"},"full":{"file":"InterviewBit-White-2.png","width":2130,"height":708,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2.png"}},"isOptimized":false,"isExternal":false},"x":-3,"y":-40,"width":180,"height":60,"mask":{"type":"rectangle"},"basedOn":"46d88c1c-7a43-4355-acc1-3a75a4e5a0cc","id":"5e87eb52-4c7b-48b0-87a5-6a9f21443327","type":"image"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"NONE","font":{"family":"Darker Grotesque"},"fontSize":28,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":1,"textAlign":"initial","padding":{"locked":true,"hasHiddenPadding":false,"horizontal":0,"vertical":0},"content":"<span style=\"font-weight: 700; color: #fff\">3. Express yourself&nbsp;<\/span>\n\n<span style=\"color: #fff\">Write a clear and concise recurrence relation. Use the variables you identified to express the problem in a mathematical equation.<\/span>","borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"x":29,"y":277,"width":354,"height":206,"tagName":"p","basedOn":"fb1c7ca5-407a-460f-a2da-4eba83b1e29b","id":"ce3c9b52-805a-4ef4-8d9a-7e1120dfc4b3","type":"text"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"NONE","font":{"family":"Roboto"},"fontSize":20,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":1.2,"textAlign":"center","padding":{"locked":true,"hasHiddenPadding":false,"horizontal":0,"vertical":0},"content":"<span style=\"font-weight: 700; color: #fff\">Ready to crack DP interviews with ease?<\/span>","borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"x":3,"y":563,"width":404,"height":23,"basedOn":"54daed4f-c8c4-4719-9942-2809033db776","id":"4476fa7c-06b4-4835-8abe-2d38aa71fa28","type":"text"}],"backgroundColor":{"color":{"r":255,"g":255,"b":255}},"animations":[{"id":"6db9c49e-eabf-4544-999d-b81d7f4ccc4d","type":"effect-background-pan-and-zoom","panDir":"rightToLeft","duration":2000,"delay":0,"zoomDirection":"scaleOut","targets":["741b80be-f1e4-4e7e-81a1-3f452436e27f"]},{"targets":["ce3c9b52-805a-4ef4-8d9a-7e1120dfc4b3"],"id":"d8dbe4f4-5ff1-4c50-ae3f-8e8d975cd699","type":"effect-fly-in","flyInDir":"topToBottom","duration":600,"delay":0}],"id":"003c04fa-fa9a-41be-99d6-dff01f94a2c3","defaultBackgroundElement":{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"x":1,"y":1,"width":1,"height":1,"mask":{"type":"rectangle"},"isBackground":true,"isDefaultBackground":true,"type":"shape","id":"62b6c641-30d3-4d7f-a8f7-6d986068c141"},"pageAttachment":{"url":"https:\/\/www.interviewbit.com\/courses\/programming\/dynamic-programming\/?utm_source=ib&utm_medium=webstories&utm_campaign=how-to-solve-any-dynamic-programming-interview-question","icon":"https:\/\/assets.interviewbit.com\/assets\/ib-logo-904db47f8d2208f21a168bfe4851e0fdcc041f2487b6a8ec0b181d3724dbd012.png.gz","needsProxy":false,"ctaText":"Explore now"}},{"elements":[{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"x":48,"y":0,"width":330,"height":494,"mask":{"type":"rectangle"},"isBackground":true,"type":"image","id":"6417e2e4-880c-4959-9e6c-834fe69f9dd6","scale":100,"focalX":50,"focalY":50,"resource":{"baseColor":"#f3f3f3","blurHash":"LeH2Zc00t6kC-:t7M{kCR*o2t6t7","type":"image","mimeType":"image\/jpeg","creationDate":"2019-07-19T11:41:39Z","src":"https:\/\/images.unsplash.com\/flagged\/photo-1563536310477-c7b4e3a800c2?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw1N3x8ZGV2ZWxvcGVyc3xlbnwwfHx8fDE2NjQ0NjYzMzM&ixlib=rb-1.2.1&fm=jpg&w=4000&h=6000&fit=max","width":4000,"height":6000,"id":"media\/unsplash:NdFREMS5P08","alt":"woman leaning at the table","sizes":{"full":{"file":"media\/unsplash:NdFREMS5P08","sourceUrl":"https:\/\/images.unsplash.com\/flagged\/photo-1563536310477-c7b4e3a800c2?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw1N3x8ZGV2ZWxvcGVyc3xlbnwwfHx8fDE2NjQ0NjYzMzM&ixlib=rb-1.2.1&fm=jpg&w=4000&h=6000&fit=max","mimeType":"image\/jpeg","width":4000,"height":6000},"large":{"file":"media\/unsplash:NdFREMS5P08","sourceUrl":"https:\/\/images.unsplash.com\/flagged\/photo-1563536310477-c7b4e3a800c2?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw1N3x8ZGV2ZWxvcGVyc3xlbnwwfHx8fDE2NjQ0NjYzMzM&ixlib=rb-1.2.1&fm=jpg&w=3200&h=4800&fit=max","mimeType":"image\/jpeg","width":3200,"height":4800},"2400_3600":{"file":"media\/unsplash:NdFREMS5P08","sourceUrl":"https:\/\/images.unsplash.com\/flagged\/photo-1563536310477-c7b4e3a800c2?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw1N3x8ZGV2ZWxvcGVyc3xlbnwwfHx8fDE2NjQ0NjYzMzM&ixlib=rb-1.2.1&fm=jpg&w=2400&h=3600&fit=max","mimeType":"image\/jpeg","width":2400,"height":3600},"1600_2400":{"file":"media\/unsplash:NdFREMS5P08","sourceUrl":"https:\/\/images.unsplash.com\/flagged\/photo-1563536310477-c7b4e3a800c2?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw1N3x8ZGV2ZWxvcGVyc3xlbnwwfHx8fDE2NjQ0NjYzMzM&ixlib=rb-1.2.1&fm=jpg&w=1600&h=2400&fit=max","mimeType":"image\/jpeg","width":1600,"height":2400},"800_1200":{"file":"media\/unsplash:NdFREMS5P08","sourceUrl":"https:\/\/images.unsplash.com\/flagged\/photo-1563536310477-c7b4e3a800c2?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw1N3x8ZGV2ZWxvcGVyc3xlbnwwfHx8fDE2NjQ0NjYzMzM&ixlib=rb-1.2.1&fm=jpg&w=800&h=1200&fit=max","mimeType":"image\/jpeg","width":800,"height":1200},"web_stories_thumbnail":{"file":"media\/unsplash:NdFREMS5P08","sourceUrl":"https:\/\/images.unsplash.com\/flagged\/photo-1563536310477-c7b4e3a800c2?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw1N3x8ZGV2ZWxvcGVyc3xlbnwwfHx8fDE2NjQ0NjYzMzM&ixlib=rb-1.2.1&fm=jpg&w=340&h=510&fit=max","mimeType":"image\/jpeg","width":340,"height":510}},"attribution":{"author":{"displayName":"Nicole Wolf","url":"https:\/\/unsplash.com\/@joeel56?utm_source=web_stories_wordpress&utm_medium=referral"},"registerUsageUrl":"https:\/\/media3p.googleapis.com\/v1\/media:registerUsage?token=AQBR4tpY2%2BUTP6YwjFpDaBiJc6fD9BN3t\/SN\/\/isMJsEmXSQBJ60Owi\/\/VGvUChr31tFJUc7HhUxUsKUi8kEq%2BgJFXy4%2BEmVF4s\/4vWvJGGnpAR8N%2BaLww0IEd0Lvx52pLKgOrLgpLtMNZVI3M8\/oZQD2pG6iyCTZSkt0H8tJqiopY5QSPWfXFf\/wZRXqSuvXREdghPw2MdZC6rJMeQ4uVFqDSwY2wqjVUc%2BWI5XeI5XCHz9cdHh"},"isPlaceholder":false,"isOptimized":false,"isMuted":false,"isExternal":true,"needsProxy":false},"overlay":{"color":{"r":0,"g":0,"b":0,"a":0.5}}},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":false,"backgroundColor":{"color":{"r":18,"g":99,"b":255,"a":0.5}},"x":-66,"y":328,"basedOn":"e2a86e16-6425-4616-8487-9d748a526332","width":575,"height":223,"mask":{"type":"rectangle"},"groupId":null,"id":"4d33a88b-035f-42ee-b31a-067de89d0aea","type":"shape"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"scale":100,"focalX":50,"focalY":50,"resource":{"type":"image","mimeType":"image\/png","creationDate":"2021-07-12T14:57:03","src":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2.png","width":2130,"height":708,"id":724,"alt":"InterviewBit-White-2","sizes":{"medium":{"file":"InterviewBit-White-2-300x100.png","width":300,"height":100,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-300x100.png"},"large":{"file":"InterviewBit-White-2-1024x340.png","width":1024,"height":340,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-1024x340.png"},"thumbnail":{"file":"InterviewBit-White-2-150x150.png","width":150,"height":150,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-150x150.png"},"medium_large":{"file":"InterviewBit-White-2-768x255.png","width":768,"height":255,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-768x255.png"},"1536x1536":{"file":"InterviewBit-White-2-1536x511.png","width":1536,"height":511,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-1536x511.png"},"2048x2048":{"file":"InterviewBit-White-2-2048x681.png","width":2048,"height":681,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-2048x681.png"},"web-stories-poster-portrait":{"file":"InterviewBit-White-2-640x708.png","width":640,"height":708,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-640x708.png"},"web-stories-poster-landscape":{"file":"InterviewBit-White-2-853x640.png","width":853,"height":640,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-853x640.png"},"web-stories-poster-square":{"file":"InterviewBit-White-2-640x640.png","width":640,"height":640,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-640x640.png"},"web-stories-publisher-logo":{"file":"InterviewBit-White-2-96x96.png","width":96,"height":96,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-96x96.png"},"web-stories-thumbnail":{"file":"InterviewBit-White-2-150x50.png","width":150,"height":50,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-150x50.png"},"full":{"file":"InterviewBit-White-2.png","width":2130,"height":708,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2.png"}},"isOptimized":false,"isExternal":false},"x":-3,"y":-40,"width":180,"height":60,"mask":{"type":"rectangle"},"basedOn":"46d88c1c-7a43-4355-acc1-3a75a4e5a0cc","id":"78fac6be-aadb-4543-8fc0-853d074437f3","type":"image"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"NONE","font":{"family":"Darker Grotesque"},"fontSize":28,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":1,"textAlign":"initial","padding":{"locked":true,"hasHiddenPadding":false,"horizontal":0,"vertical":0},"content":"<span style=\"font-weight: 700; color: #fff\">4. Base cases matter&nbsp;<\/span>\n\n<span style=\"color: #fff\">Identify the base cases. They are the simplest possible inputs to the problem. Having base cases helps you terminate the recursion.<\/span>","borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"x":29,"y":277,"width":354,"height":178,"tagName":"p","basedOn":"ce3c9b52-805a-4ef4-8d9a-7e1120dfc4b3","id":"d26d3b6d-6de4-4029-880f-f4c6277141e5","type":"text"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"NONE","font":{"family":"Roboto"},"fontSize":20,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":1.2,"textAlign":"center","padding":{"locked":true,"hasHiddenPadding":false,"horizontal":0,"vertical":0},"content":"<span style=\"font-weight: 700; color: #fff\">Ready to crack DP interviews with ease?<\/span>","borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"x":3,"y":563,"width":404,"height":23,"basedOn":"54daed4f-c8c4-4719-9942-2809033db776","id":"731d82d1-e0f5-4c05-bbc1-5243b3b60dd0","type":"text"}],"backgroundColor":{"color":{"r":255,"g":255,"b":255}},"animations":[{"targets":["6417e2e4-880c-4959-9e6c-834fe69f9dd6"],"id":"03ac9f99-3913-43f3-8912-6a82e961b65f","type":"effect-background-pan-and-zoom","panDir":"rightToLeft","duration":2000,"delay":0,"zoomDirection":"scaleOut"},{"targets":["d26d3b6d-6de4-4029-880f-f4c6277141e5"],"id":"de2c6109-5493-414c-a599-7313ff1f002a","type":"effect-fly-in","flyInDir":"topToBottom","duration":600,"delay":0}],"id":"e527486a-774a-4c1c-b1b0-bc90e6a54bf1","defaultBackgroundElement":{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"x":1,"y":1,"width":1,"height":1,"mask":{"type":"rectangle"},"isBackground":true,"isDefaultBackground":true,"type":"shape","id":"d31da76a-9529-4b96-b2bc-42a3a007f7e0"},"pageAttachment":{"url":"https:\/\/www.interviewbit.com\/courses\/programming\/dynamic-programming\/?utm_source=ib&utm_medium=webstories&utm_campaign=how-to-solve-any-dynamic-programming-interview-question","icon":"https:\/\/assets.interviewbit.com\/assets\/ib-logo-904db47f8d2208f21a168bfe4851e0fdcc041f2487b6a8ec0b181d3724dbd012.png.gz","needsProxy":false,"ctaText":"Explore now"}},{"elements":[{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"x":48,"y":0,"width":330,"height":439,"mask":{"type":"rectangle"},"isBackground":true,"type":"image","id":"b19a915c-b36c-4ffc-aa9b-88d820dd2aef","scale":100,"focalX":50,"focalY":50,"resource":{"type":"image","mimeType":"image\/jpeg","width":2707,"height":3608,"sizes":{"full":{"file":"media\/unsplash:xTHcNZAQzbM","sourceUrl":"https:\/\/images.unsplash.com\/photo-1582138825658-fb952c08b282?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzOXx8amF2YSUyMGRldmVsb3BlcnN8ZW58MHx8fHwxNjcyOTIzNjA5&ixlib=rb-4.0.3&fm=jpg&w=2707&h=3608&fit=max","mimeType":"image\/jpeg","width":2707,"height":3608},"large":{"file":"media\/unsplash:xTHcNZAQzbM","sourceUrl":"https:\/\/images.unsplash.com\/photo-1582138825658-fb952c08b282?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzOXx8amF2YSUyMGRldmVsb3BlcnN8ZW58MHx8fHwxNjcyOTIzNjA5&ixlib=rb-4.0.3&fm=jpg&w=2165&h=2886&fit=max","mimeType":"image\/jpeg","width":2165,"height":2886},"1624_2165":{"file":"media\/unsplash:xTHcNZAQzbM","sourceUrl":"https:\/\/images.unsplash.com\/photo-1582138825658-fb952c08b282?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzOXx8amF2YSUyMGRldmVsb3BlcnN8ZW58MHx8fHwxNjcyOTIzNjA5&ixlib=rb-4.0.3&fm=jpg&w=1624&h=2165&fit=max","mimeType":"image\/jpeg","width":1624,"height":2165},"1082_1442":{"file":"media\/unsplash:xTHcNZAQzbM","sourceUrl":"https:\/\/images.unsplash.com\/photo-1582138825658-fb952c08b282?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzOXx8amF2YSUyMGRldmVsb3BlcnN8ZW58MHx8fHwxNjcyOTIzNjA5&ixlib=rb-4.0.3&fm=jpg&w=1082&h=1442&fit=max","mimeType":"image\/jpeg","width":1082,"height":1442},"541_721":{"file":"media\/unsplash:xTHcNZAQzbM","sourceUrl":"https:\/\/images.unsplash.com\/photo-1582138825658-fb952c08b282?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzOXx8amF2YSUyMGRldmVsb3BlcnN8ZW58MHx8fHwxNjcyOTIzNjA5&ixlib=rb-4.0.3&fm=jpg&w=541&h=721&fit=max","mimeType":"image\/jpeg","width":541,"height":721},"web_stories_thumbnail":{"file":"media\/unsplash:xTHcNZAQzbM","sourceUrl":"https:\/\/images.unsplash.com\/photo-1582138825658-fb952c08b282?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzOXx8amF2YSUyMGRldmVsb3BlcnN8ZW58MHx8fHwxNjcyOTIzNjA5&ixlib=rb-4.0.3&fm=jpg&w=340&h=453&fit=max","mimeType":"image\/jpeg","width":340,"height":453}},"isPlaceholder":false,"isExternal":true,"needsProxy":false,"id":"media\/unsplash:xTHcNZAQzbM","baseColor":"#a6c0c0","blurHash":"LIHog[%~0#?c;]0LXS_2XnnK#ktR","creationDate":"2020-02-19T19:00:28Z","src":"https:\/\/images.unsplash.com\/photo-1582138825658-fb952c08b282?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzOXx8amF2YSUyMGRldmVsb3BlcnN8ZW58MHx8fHwxNjcyOTIzNjA5&ixlib=rb-4.0.3&fm=jpg&w=2707&h=3608&fit=max","alt":"man in blue hoodie looking at macbook","attribution":{"author":{"displayName":"Muha Ajjan","url":"https:\/\/unsplash.com\/@isword?utm_source=web_stories_wordpress&utm_medium=referral"},"registerUsageUrl":"https:\/\/media3p.googleapis.com\/v1\/media:registerUsage?token=AXhJFEfId4I1csAV1OQOm3EkyhqWPH6nQmdYzEoP86I6cJQfr5mH15Z%2BNSS1o2xrPUqlmL96Tr98Oyx9upOS\/VHEvKtYvAb%2BEpsygQwqbsZTbrfAkUvwevZ%2BYwo6xBO19RCy732cBv\/zHXs3jKHQhEZJfg026otvzoEop%2BvUvS1P5jpmGq8htnFt8Ayd80jNHdLGubchGCxtPvlZTDOiLda5dIX%2B2qy0YhZqnkqbmruaETcLzA\/y3CposfG3BSM7"}},"overlay":{"color":{"r":0,"g":0,"b":0,"a":0.5}}},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":false,"backgroundColor":{"color":{"r":18,"g":99,"b":255,"a":0.5}},"x":-66,"y":328,"basedOn":"e2a86e16-6425-4616-8487-9d748a526332","width":575,"height":223,"mask":{"type":"rectangle"},"groupId":null,"id":"fd550b36-80a6-47dc-b294-5865799c9537","type":"shape"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"scale":100,"focalX":50,"focalY":50,"resource":{"type":"image","mimeType":"image\/png","creationDate":"2021-07-12T14:57:03","src":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2.png","width":2130,"height":708,"id":724,"alt":"InterviewBit-White-2","sizes":{"medium":{"file":"InterviewBit-White-2-300x100.png","width":300,"height":100,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-300x100.png"},"large":{"file":"InterviewBit-White-2-1024x340.png","width":1024,"height":340,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-1024x340.png"},"thumbnail":{"file":"InterviewBit-White-2-150x150.png","width":150,"height":150,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-150x150.png"},"medium_large":{"file":"InterviewBit-White-2-768x255.png","width":768,"height":255,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-768x255.png"},"1536x1536":{"file":"InterviewBit-White-2-1536x511.png","width":1536,"height":511,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-1536x511.png"},"2048x2048":{"file":"InterviewBit-White-2-2048x681.png","width":2048,"height":681,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-2048x681.png"},"web-stories-poster-portrait":{"file":"InterviewBit-White-2-640x708.png","width":640,"height":708,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-640x708.png"},"web-stories-poster-landscape":{"file":"InterviewBit-White-2-853x640.png","width":853,"height":640,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-853x640.png"},"web-stories-poster-square":{"file":"InterviewBit-White-2-640x640.png","width":640,"height":640,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-640x640.png"},"web-stories-publisher-logo":{"file":"InterviewBit-White-2-96x96.png","width":96,"height":96,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-96x96.png"},"web-stories-thumbnail":{"file":"InterviewBit-White-2-150x50.png","width":150,"height":50,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-150x50.png"},"full":{"file":"InterviewBit-White-2.png","width":2130,"height":708,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2.png"}},"isOptimized":false,"isExternal":false},"x":-3,"y":-40,"width":180,"height":60,"mask":{"type":"rectangle"},"basedOn":"78fac6be-aadb-4543-8fc0-853d074437f3","id":"3e628981-0470-432e-b450-b46b4dd70164","type":"image"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"NONE","font":{"family":"Darker Grotesque"},"fontSize":28,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":1,"textAlign":"initial","padding":{"locked":true,"hasHiddenPadding":false,"horizontal":0,"vertical":0},"content":"<span style=\"font-weight: 700; color: #fff\">5. Iterate or Recurse?&nbsp;<\/span>\n\n<span style=\"color: #fff\">Decide whether to implement the problem iteratively or recursively. Iterative solutions are usually faster, but recursive solutions are easier to understand.<\/span>","borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"x":29,"y":277,"width":354,"height":206,"tagName":"p","basedOn":"d26d3b6d-6de4-4029-880f-f4c6277141e5","id":"cdf613ea-fe94-4331-b424-0e75c711993d","type":"text"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"NONE","font":{"family":"Roboto"},"fontSize":20,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":1.2,"textAlign":"center","padding":{"locked":true,"hasHiddenPadding":false,"horizontal":0,"vertical":0},"content":"<span style=\"font-weight: 700; color: #fff\">Ready to crack DP interviews with ease?<\/span>","borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"x":3,"y":563,"width":404,"height":23,"basedOn":"54daed4f-c8c4-4719-9942-2809033db776","id":"e390a197-8b40-4012-99d7-cc48dc01ec2c","type":"text"}],"backgroundColor":{"color":{"r":255,"g":255,"b":255}},"animations":[{"id":"93832470-e5d8-4e91-8cd3-e7a5d985dba7","type":"effect-background-pan-and-zoom","panDir":"rightToLeft","duration":2000,"delay":0,"zoomDirection":"scaleOut","targets":["b19a915c-b36c-4ffc-aa9b-88d820dd2aef"]},{"targets":["cdf613ea-fe94-4331-b424-0e75c711993d"],"id":"7485e5e9-a576-495f-9ca5-2f93bca276e6","type":"effect-fly-in","flyInDir":"topToBottom","duration":600,"delay":0}],"id":"c699d037-0d65-42ff-be87-cc83edf95486","defaultBackgroundElement":{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"x":1,"y":1,"width":1,"height":1,"mask":{"type":"rectangle"},"isBackground":true,"isDefaultBackground":true,"type":"shape","id":"e6f59b6e-008a-4cb7-bd3c-f910fb430d89"},"pageAttachment":{"url":"https:\/\/www.interviewbit.com\/courses\/programming\/dynamic-programming\/?utm_source=ib&utm_medium=webstories&utm_campaign=how-to-solve-any-dynamic-programming-interview-question","icon":"https:\/\/assets.interviewbit.com\/assets\/ib-logo-904db47f8d2208f21a168bfe4851e0fdcc041f2487b6a8ec0b181d3724dbd012.png.gz","needsProxy":false,"ctaText":"Explore now"}},{"elements":[{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"x":48,"y":0,"width":330,"height":494,"mask":{"type":"rectangle"},"isBackground":true,"type":"image","id":"de5cfed0-3524-444b-8ba8-844b625d16ed","scale":100,"focalX":50,"focalY":50,"resource":{"type":"image","mimeType":"image\/jpeg","width":1861,"height":2792,"sizes":{"full":{"file":"media\/unsplash:PFC2fY9LE_g","sourceUrl":"https:\/\/images.unsplash.com\/photo-1545184180-25d471fe75eb?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxtYW4lMjB3aXRoJTIwbGFwdG9wfGVufDB8fHx8MTY3NzU4Nzg0Nw&ixlib=rb-4.0.3&fm=jpg&w=1861&h=2792&fit=max","mimeType":"image\/jpeg","width":1861,"height":2792},"large":{"file":"media\/unsplash:PFC2fY9LE_g","sourceUrl":"https:\/\/images.unsplash.com\/photo-1545184180-25d471fe75eb?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxtYW4lMjB3aXRoJTIwbGFwdG9wfGVufDB8fHx8MTY3NzU4Nzg0Nw&ixlib=rb-4.0.3&fm=jpg&w=1488&h=2232&fit=max","mimeType":"image\/jpeg","width":1488,"height":2232},"1116_1674":{"file":"media\/unsplash:PFC2fY9LE_g","sourceUrl":"https:\/\/images.unsplash.com\/photo-1545184180-25d471fe75eb?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxtYW4lMjB3aXRoJTIwbGFwdG9wfGVufDB8fHx8MTY3NzU4Nzg0Nw&ixlib=rb-4.0.3&fm=jpg&w=1116&h=1674&fit=max","mimeType":"image\/jpeg","width":1116,"height":1674},"744_1116":{"file":"media\/unsplash:PFC2fY9LE_g","sourceUrl":"https:\/\/images.unsplash.com\/photo-1545184180-25d471fe75eb?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxtYW4lMjB3aXRoJTIwbGFwdG9wfGVufDB8fHx8MTY3NzU4Nzg0Nw&ixlib=rb-4.0.3&fm=jpg&w=744&h=1116&fit=max","mimeType":"image\/jpeg","width":744,"height":1116},"372_558":{"file":"media\/unsplash:PFC2fY9LE_g","sourceUrl":"https:\/\/images.unsplash.com\/photo-1545184180-25d471fe75eb?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxtYW4lMjB3aXRoJTIwbGFwdG9wfGVufDB8fHx8MTY3NzU4Nzg0Nw&ixlib=rb-4.0.3&fm=jpg&w=372&h=558&fit=max","mimeType":"image\/jpeg","width":372,"height":558},"web_stories_thumbnail":{"file":"media\/unsplash:PFC2fY9LE_g","sourceUrl":"https:\/\/images.unsplash.com\/photo-1545184180-25d471fe75eb?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxtYW4lMjB3aXRoJTIwbGFwdG9wfGVufDB8fHx8MTY3NzU4Nzg0Nw&ixlib=rb-4.0.3&fm=jpg&w=340&h=510&fit=max","mimeType":"image\/jpeg","width":340,"height":510}},"isPlaceholder":false,"isExternal":true,"needsProxy":false,"id":"media\/unsplash:PFC2fY9LE_g","baseColor":"#404040","blurHash":"LJCG75~W-.%1%#%MW;oI4.E1M|Ip","creationDate":"2018-12-19T01:50:27Z","src":"https:\/\/images.unsplash.com\/photo-1545184180-25d471fe75eb?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxtYW4lMjB3aXRoJTIwbGFwdG9wfGVufDB8fHx8MTY3NzU4Nzg0Nw&ixlib=rb-4.0.3&fm=jpg&w=1861&h=2792&fit=max","alt":"man sitting while having coffee and using laptop","attribution":{"author":{"displayName":"KAL VISUALS","url":"https:\/\/unsplash.com\/pt-br\/@kalvisuals?utm_source=web_stories_wordpress&utm_medium=referral"},"registerUsageUrl":"https:\/\/media3p.googleapis.com\/v1\/media:registerUsage?token=Aa0pnNYDVdeb7WB95ep%2B8F1FZTA2n82AbZLXkl\/hdIUCA5EU5zV3vIR4Z00dKoVHzGC\/LlQ%2BjF8diXssC0O\/Uenysx94gwSglwEiOchDSH7kTDvjYDnUVASgiFxs3VKngVoQcAzjI\/TS4%2Bubs4WAfrtH1W3HB\/X198jfZPz7So8%2B%2Bk8rXKmUSCOh46bNRgSEO9uEI2108GBUI20AVNUHPInAe2zVoZMPN8E42YdiXivC3%2BswZ9R7KBf1eTMUKBFvWqc%3D"}},"overlay":{"color":{"r":0,"g":0,"b":0,"a":0.5}}},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":false,"backgroundColor":{"color":{"r":18,"g":99,"b":255,"a":0.5}},"x":-66,"y":328,"basedOn":"1268e650-dded-4758-8f33-3518948e2268","width":575,"height":223,"mask":{"type":"rectangle"},"groupId":null,"id":"acf43490-ac1f-44f4-8c80-94a6d8620b66","type":"shape"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"scale":100,"focalX":50,"focalY":50,"resource":{"type":"image","mimeType":"image\/png","creationDate":"2021-07-12T14:57:03","src":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2.png","width":2130,"height":708,"id":724,"alt":"InterviewBit-White-2","sizes":{"medium":{"file":"InterviewBit-White-2-300x100.png","width":300,"height":100,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-300x100.png"},"large":{"file":"InterviewBit-White-2-1024x340.png","width":1024,"height":340,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-1024x340.png"},"thumbnail":{"file":"InterviewBit-White-2-150x150.png","width":150,"height":150,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-150x150.png"},"medium_large":{"file":"InterviewBit-White-2-768x255.png","width":768,"height":255,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-768x255.png"},"1536x1536":{"file":"InterviewBit-White-2-1536x511.png","width":1536,"height":511,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-1536x511.png"},"2048x2048":{"file":"InterviewBit-White-2-2048x681.png","width":2048,"height":681,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-2048x681.png"},"web-stories-poster-portrait":{"file":"InterviewBit-White-2-640x708.png","width":640,"height":708,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-640x708.png"},"web-stories-poster-landscape":{"file":"InterviewBit-White-2-853x640.png","width":853,"height":640,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-853x640.png"},"web-stories-poster-square":{"file":"InterviewBit-White-2-640x640.png","width":640,"height":640,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-640x640.png"},"web-stories-publisher-logo":{"file":"InterviewBit-White-2-96x96.png","width":96,"height":96,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-96x96.png"},"web-stories-thumbnail":{"file":"InterviewBit-White-2-150x50.png","width":150,"height":50,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-150x50.png"},"full":{"file":"InterviewBit-White-2.png","width":2130,"height":708,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2.png"}},"isOptimized":false,"isExternal":false},"x":-3,"y":-40,"width":180,"height":60,"mask":{"type":"rectangle"},"basedOn":"d3952aa0-b3c9-46fa-80c2-f0d24fefa993","id":"8ea3c9b6-cf44-4a37-aa52-d09910e35602","type":"image"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"NONE","font":{"family":"Darker Grotesque"},"fontSize":28,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":1,"textAlign":"initial","padding":{"locked":true,"hasHiddenPadding":false,"horizontal":0,"vertical":0},"content":"<span style=\"font-weight: 700; color: #fff\">6. Memoize to optimize&nbsp;<\/span>\n\n<span style=\"color: #fff\">Add memoization to your solution. Memoization stores the results of previous calculations &amp; avoids redundant calculations. It's a great way to optimize DP solutions.<\/span>","borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"x":29,"y":277,"width":354,"height":206,"tagName":"p","basedOn":"cdf613ea-fe94-4331-b424-0e75c711993d","id":"95fa3ff2-d162-4634-b2ae-9757ed286f9f","type":"text"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"NONE","font":{"family":"Roboto"},"fontSize":20,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":1.2,"textAlign":"center","padding":{"locked":true,"hasHiddenPadding":false,"horizontal":0,"vertical":0},"content":"<span style=\"font-weight: 700; color: #fff\">Ready to crack DP interviews with ease?<\/span>","borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"x":3,"y":563,"width":404,"height":23,"basedOn":"54daed4f-c8c4-4719-9942-2809033db776","id":"70dfeb7b-db08-4e3f-ad50-aca6e893a417","type":"text"}],"backgroundColor":{"color":{"r":255,"g":255,"b":255}},"animations":[{"id":"34ad718f-2cf4-4ad7-9dcf-6609629f4224","type":"effect-background-pan-and-zoom","panDir":"rightToLeft","duration":2000,"delay":0,"zoomDirection":"scaleOut","targets":["de5cfed0-3524-444b-8ba8-844b625d16ed"]},{"targets":["95fa3ff2-d162-4634-b2ae-9757ed286f9f"],"id":"dab70d79-cb11-4164-8c65-98556d0eaf55","type":"effect-fly-in","flyInDir":"topToBottom","duration":600,"delay":0}],"id":"58c96625-3ab1-427b-95e4-8164f9bd6367","defaultBackgroundElement":{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"x":1,"y":1,"width":1,"height":1,"mask":{"type":"rectangle"},"isBackground":true,"isDefaultBackground":true,"type":"shape","id":"20d0c25a-6e42-4feb-9c08-c32e7f03299c"},"pageAttachment":{"url":"https:\/\/www.interviewbit.com\/courses\/programming\/dynamic-programming\/?utm_source=ib&utm_medium=webstories&utm_campaign=how-to-solve-any-dynamic-programming-interview-question","icon":"https:\/\/assets.interviewbit.com\/assets\/ib-logo-904db47f8d2208f21a168bfe4851e0fdcc041f2487b6a8ec0b181d3724dbd012.png.gz","needsProxy":false,"ctaText":"Explore now"}},{"elements":[{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"scale":100,"focalX":50,"focalY":50,"resource":{"type":"image","mimeType":"image\/jpeg","width":1861,"height":2792,"sizes":{"full":{"file":"media\/unsplash:PFC2fY9LE_g","sourceUrl":"https:\/\/images.unsplash.com\/photo-1545184180-25d471fe75eb?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxtYW4lMjB3aXRoJTIwbGFwdG9wfGVufDB8fHx8MTY3NzU4Nzg0Nw&ixlib=rb-4.0.3&fm=jpg&w=1861&h=2792&fit=max","mimeType":"image\/jpeg","width":1861,"height":2792},"large":{"file":"media\/unsplash:PFC2fY9LE_g","sourceUrl":"https:\/\/images.unsplash.com\/photo-1545184180-25d471fe75eb?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxtYW4lMjB3aXRoJTIwbGFwdG9wfGVufDB8fHx8MTY3NzU4Nzg0Nw&ixlib=rb-4.0.3&fm=jpg&w=1488&h=2232&fit=max","mimeType":"image\/jpeg","width":1488,"height":2232},"1116_1674":{"file":"media\/unsplash:PFC2fY9LE_g","sourceUrl":"https:\/\/images.unsplash.com\/photo-1545184180-25d471fe75eb?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxtYW4lMjB3aXRoJTIwbGFwdG9wfGVufDB8fHx8MTY3NzU4Nzg0Nw&ixlib=rb-4.0.3&fm=jpg&w=1116&h=1674&fit=max","mimeType":"image\/jpeg","width":1116,"height":1674},"744_1116":{"file":"media\/unsplash:PFC2fY9LE_g","sourceUrl":"https:\/\/images.unsplash.com\/photo-1545184180-25d471fe75eb?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxtYW4lMjB3aXRoJTIwbGFwdG9wfGVufDB8fHx8MTY3NzU4Nzg0Nw&ixlib=rb-4.0.3&fm=jpg&w=744&h=1116&fit=max","mimeType":"image\/jpeg","width":744,"height":1116},"372_558":{"file":"media\/unsplash:PFC2fY9LE_g","sourceUrl":"https:\/\/images.unsplash.com\/photo-1545184180-25d471fe75eb?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxtYW4lMjB3aXRoJTIwbGFwdG9wfGVufDB8fHx8MTY3NzU4Nzg0Nw&ixlib=rb-4.0.3&fm=jpg&w=372&h=558&fit=max","mimeType":"image\/jpeg","width":372,"height":558},"web_stories_thumbnail":{"file":"media\/unsplash:PFC2fY9LE_g","sourceUrl":"https:\/\/images.unsplash.com\/photo-1545184180-25d471fe75eb?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxtYW4lMjB3aXRoJTIwbGFwdG9wfGVufDB8fHx8MTY3NzU4Nzg0Nw&ixlib=rb-4.0.3&fm=jpg&w=340&h=510&fit=max","mimeType":"image\/jpeg","width":340,"height":510}},"isPlaceholder":false,"isExternal":true,"needsProxy":false,"id":"media\/unsplash:PFC2fY9LE_g","baseColor":"#404040","blurHash":"LJCG75~W-.%1%#%MW;oI4.E1M|Ip","creationDate":"2018-12-19T01:50:27Z","src":"https:\/\/images.unsplash.com\/photo-1545184180-25d471fe75eb?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxtYW4lMjB3aXRoJTIwbGFwdG9wfGVufDB8fHx8MTY3NzU4Nzg0Nw&ixlib=rb-4.0.3&fm=jpg&w=1861&h=2792&fit=max","alt":"man sitting while having coffee and using laptop","attribution":{"author":{"displayName":"KAL VISUALS","url":"https:\/\/unsplash.com\/pt-br\/@kalvisuals?utm_source=web_stories_wordpress&utm_medium=referral"},"registerUsageUrl":"https:\/\/media3p.googleapis.com\/v1\/media:registerUsage?token=Aa0pnNYDVdeb7WB95ep%2B8F1FZTA2n82AbZLXkl\/hdIUCA5EU5zV3vIR4Z00dKoVHzGC\/LlQ%2BjF8diXssC0O\/Uenysx94gwSglwEiOchDSH7kTDvjYDnUVASgiFxs3VKngVoQcAzjI\/TS4%2Bubs4WAfrtH1W3HB\/X198jfZPz7So8%2B%2Bk8rXKmUSCOh46bNRgSEO9uEI2108GBUI20AVNUHPInAe2zVoZMPN8E42YdiXivC3%2BswZ9R7KBf1eTMUKBFvWqc%3D"}},"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"x":48,"y":0,"width":330,"height":494,"mask":{"type":"rectangle"},"isBackground":true,"id":"f7a422eb-5bb3-47e1-a8d5-dd78d07805a2","overlay":{"color":{"r":0,"g":0,"b":0,"a":0.5}},"type":"image","basedOn":"de5cfed0-3524-444b-8ba8-844b625d16ed"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":false,"backgroundColor":{"color":{"r":18,"g":99,"b":255,"a":0.5}},"x":-66,"y":328,"basedOn":"acf43490-ac1f-44f4-8c80-94a6d8620b66","width":575,"height":223,"mask":{"type":"rectangle"},"groupId":null,"id":"a6f00ed3-e9bd-42ef-868e-c3ed3fea9f5a","type":"shape"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"scale":100,"focalX":50,"focalY":50,"resource":{"type":"image","mimeType":"image\/png","creationDate":"2021-07-12T14:57:03","src":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2.png","width":2130,"height":708,"id":724,"alt":"InterviewBit-White-2","sizes":{"medium":{"file":"InterviewBit-White-2-300x100.png","width":300,"height":100,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-300x100.png"},"large":{"file":"InterviewBit-White-2-1024x340.png","width":1024,"height":340,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-1024x340.png"},"thumbnail":{"file":"InterviewBit-White-2-150x150.png","width":150,"height":150,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-150x150.png"},"medium_large":{"file":"InterviewBit-White-2-768x255.png","width":768,"height":255,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-768x255.png"},"1536x1536":{"file":"InterviewBit-White-2-1536x511.png","width":1536,"height":511,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-1536x511.png"},"2048x2048":{"file":"InterviewBit-White-2-2048x681.png","width":2048,"height":681,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-2048x681.png"},"web-stories-poster-portrait":{"file":"InterviewBit-White-2-640x708.png","width":640,"height":708,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-640x708.png"},"web-stories-poster-landscape":{"file":"InterviewBit-White-2-853x640.png","width":853,"height":640,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-853x640.png"},"web-stories-poster-square":{"file":"InterviewBit-White-2-640x640.png","width":640,"height":640,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-640x640.png"},"web-stories-publisher-logo":{"file":"InterviewBit-White-2-96x96.png","width":96,"height":96,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-96x96.png"},"web-stories-thumbnail":{"file":"InterviewBit-White-2-150x50.png","width":150,"height":50,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-150x50.png"},"full":{"file":"InterviewBit-White-2.png","width":2130,"height":708,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2.png"}},"isOptimized":false,"isExternal":false},"x":-3,"y":-40,"width":180,"height":60,"mask":{"type":"rectangle"},"basedOn":"8ea3c9b6-cf44-4a37-aa52-d09910e35602","id":"060348f7-1aed-4c75-bc7e-450c170b43d5","type":"image"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"NONE","font":{"family":"Darker Grotesque"},"fontSize":28,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":1,"textAlign":"initial","padding":{"locked":true,"hasHiddenPadding":false,"horizontal":0,"vertical":0},"content":"<span style=\"font-weight: 700; color: #fff\">7. Time is of the essence&nbsp;<\/span>\n\n<span style=\"color: #fff\">Determine the time complexity of your solution. It tells you how efficient your algorithm is. A good time complexity is O(n) or better.<\/span>","borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"x":29,"y":277,"width":354,"height":178,"tagName":"p","basedOn":"95fa3ff2-d162-4634-b2ae-9757ed286f9f","id":"cd44ef26-0897-429b-978a-05093f323da3","type":"text"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"NONE","font":{"family":"Roboto"},"fontSize":20,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":1.2,"textAlign":"center","padding":{"locked":true,"hasHiddenPadding":false,"horizontal":0,"vertical":0},"content":"<span style=\"font-weight: 700; color: #fff\">Ready to crack DP interviews with ease?<\/span>","borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"x":3,"y":563,"width":404,"height":23,"basedOn":"54daed4f-c8c4-4719-9942-2809033db776","id":"1302546c-ee62-4655-a81d-6a56a7420f42","type":"text"}],"backgroundColor":{"color":{"r":255,"g":255,"b":255}},"animations":[{"id":"5abace67-5d15-48ac-860a-b57d6dafa389","type":"effect-background-pan-and-zoom","panDir":"rightToLeft","duration":2000,"delay":0,"zoomDirection":"scaleOut","targets":["f7a422eb-5bb3-47e1-a8d5-dd78d07805a2"]},{"targets":["cd44ef26-0897-429b-978a-05093f323da3"],"id":"2d8c541f-5968-406d-850d-0a9978711c39","type":"effect-fly-in","flyInDir":"topToBottom","duration":600,"delay":0}],"id":"4147d07a-9c06-4df9-af09-c51340cff88c","defaultBackgroundElement":{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"x":1,"y":1,"width":1,"height":1,"mask":{"type":"rectangle"},"isBackground":true,"isDefaultBackground":true,"type":"shape","id":"20d0c25a-6e42-4feb-9c08-c32e7f03299c"},"pageAttachment":{"url":"https:\/\/www.interviewbit.com\/courses\/programming\/dynamic-programming\/?utm_source=ib&utm_medium=webstories&utm_campaign=how-to-solve-any-dynamic-programming-interview-question","icon":"","needsProxy":false,"ctaText":"Explore now"}},{"elements":[{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"x":48,"y":0,"width":330,"height":219,"mask":{"type":"rectangle"},"isBackground":true,"type":"image","id":"52e4f493-e25d-4e03-b7aa-697c8631c3c3","scale":100,"focalX":50,"focalY":50,"resource":{"baseColor":"#262626","blurHash":"L55F8.M{8wx]x]RPVsx]IUn$x]bc","type":"image","mimeType":"image\/jpeg","creationDate":"2017-06-10T10:38:52Z","src":"https:\/\/images.unsplash.com\/photo-1497091071254-cc9b2ba7c48a?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw0MHx8cmVzdW1lfGVufDB8fHx8MTY2NjA2MjgxNA&ixlib=rb-1.2.1&fm=jpg&w=4288&h=2848&fit=max","width":4288,"height":2848,"id":"media\/unsplash:P1qyEf1g0HU","alt":"person using track pad","sizes":{"full":{"file":"media\/unsplash:P1qyEf1g0HU","sourceUrl":"https:\/\/images.unsplash.com\/photo-1497091071254-cc9b2ba7c48a?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw0MHx8cmVzdW1lfGVufDB8fHx8MTY2NjA2MjgxNA&ixlib=rb-1.2.1&fm=jpg&w=4288&h=2848&fit=max","mimeType":"image\/jpeg","width":4288,"height":2848},"large":{"file":"media\/unsplash:P1qyEf1g0HU","sourceUrl":"https:\/\/images.unsplash.com\/photo-1497091071254-cc9b2ba7c48a?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw0MHx8cmVzdW1lfGVufDB8fHx8MTY2NjA2MjgxNA&ixlib=rb-1.2.1&fm=jpg&w=3430&h=2278&fit=max","mimeType":"image\/jpeg","width":3430,"height":2278},"2572_1708":{"file":"media\/unsplash:P1qyEf1g0HU","sourceUrl":"https:\/\/images.unsplash.com\/photo-1497091071254-cc9b2ba7c48a?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw0MHx8cmVzdW1lfGVufDB8fHx8MTY2NjA2MjgxNA&ixlib=rb-1.2.1&fm=jpg&w=2572&h=1708&fit=max","mimeType":"image\/jpeg","width":2572,"height":1708},"1715_1139":{"file":"media\/unsplash:P1qyEf1g0HU","sourceUrl":"https:\/\/images.unsplash.com\/photo-1497091071254-cc9b2ba7c48a?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw0MHx8cmVzdW1lfGVufDB8fHx8MTY2NjA2MjgxNA&ixlib=rb-1.2.1&fm=jpg&w=1715&h=1139&fit=max","mimeType":"image\/jpeg","width":1715,"height":1139},"857_569":{"file":"media\/unsplash:P1qyEf1g0HU","sourceUrl":"https:\/\/images.unsplash.com\/photo-1497091071254-cc9b2ba7c48a?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw0MHx8cmVzdW1lfGVufDB8fHx8MTY2NjA2MjgxNA&ixlib=rb-1.2.1&fm=jpg&w=857&h=569&fit=max","mimeType":"image\/jpeg","width":857,"height":569},"web_stories_thumbnail":{"file":"media\/unsplash:P1qyEf1g0HU","sourceUrl":"https:\/\/images.unsplash.com\/photo-1497091071254-cc9b2ba7c48a?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw0MHx8cmVzdW1lfGVufDB8fHx8MTY2NjA2MjgxNA&ixlib=rb-1.2.1&fm=jpg&w=340&h=226&fit=max","mimeType":"image\/jpeg","width":340,"height":226}},"attribution":{"author":{"displayName":"Glenn Carstens-Peters","url":"https:\/\/unsplash.com\/@glenncarstenspeters?utm_source=web_stories_wordpress&utm_medium=referral"},"registerUsageUrl":"https:\/\/media3p.googleapis.com\/v1\/media:registerUsage?token=AQBR4tqzFQk9mistNseDeeHEJMsZ1s4y0bq50WT55T0X23zUUBQBPQdK4apQBMpRXEDve3pzCQh%2B4eIoPWyosKbjNOJi0rW7VNMuRbdNCMCpD57sUk8BirmXYJAXqxgWO26HCxN6tj3TE6bIiA2wunnBSNozdaR%2B3b7GYMsOajhfH8M7uvC%2B2XPNl\/rTXwFB4gJFs%2Bkv4F2ixncVopF6zS%2BxWuraKdtkUD8aHd5uSlykrQ%3D%3D"},"isPlaceholder":false,"isOptimized":false,"isMuted":false,"isExternal":true,"needsProxy":false},"overlay":{"type":"linear","rotation":0,"stops":[{"color":{"r":0,"g":0,"b":0,"a":0},"position":0.4},{"color":{"r":0,"g":0,"b":0,"a":1},"position":1}],"alpha":0.5}},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"scale":100,"focalX":50,"focalY":50,"resource":{"type":"image","mimeType":"image\/png","creationDate":"2021-07-12T14:57:03","src":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2.png","width":2130,"height":708,"id":724,"alt":"InterviewBit-White-2","sizes":{"medium":{"file":"InterviewBit-White-2-300x100.png","width":300,"height":100,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-300x100.png"},"large":{"file":"InterviewBit-White-2-1024x340.png","width":1024,"height":340,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-1024x340.png"},"thumbnail":{"file":"InterviewBit-White-2-150x150.png","width":150,"height":150,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-150x150.png"},"medium_large":{"file":"InterviewBit-White-2-768x255.png","width":768,"height":255,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-768x255.png"},"1536x1536":{"file":"InterviewBit-White-2-1536x511.png","width":1536,"height":511,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-1536x511.png"},"2048x2048":{"file":"InterviewBit-White-2-2048x681.png","width":2048,"height":681,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-2048x681.png"},"web-stories-poster-portrait":{"file":"InterviewBit-White-2-640x708.png","width":640,"height":708,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-640x708.png"},"web-stories-poster-landscape":{"file":"InterviewBit-White-2-853x640.png","width":853,"height":640,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-853x640.png"},"web-stories-poster-square":{"file":"InterviewBit-White-2-640x640.png","width":640,"height":640,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-640x640.png"},"web-stories-publisher-logo":{"file":"InterviewBit-White-2-96x96.png","width":96,"height":96,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-96x96.png"},"web-stories-thumbnail":{"file":"InterviewBit-White-2-150x50.png","width":150,"height":50,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-150x50.png"},"full":{"file":"InterviewBit-White-2.png","width":2130,"height":708,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2.png"}},"isOptimized":false,"isExternal":false},"x":-3,"y":-40,"width":180,"height":60,"mask":{"type":"rectangle"},"basedOn":"765959d5-f19c-4c63-9fcc-dcf7b025b822","id":"85da65c1-1fb2-40ba-8a02-41ca3ec7d153","type":"image"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"NONE","font":{"family":"Roboto"},"fontSize":23,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":1,"textAlign":"left","padding":{"locked":true,"hasHiddenPadding":false,"horizontal":0,"vertical":0},"content":"<span style=\"color: #1263ff\">Look no further than InterviewBit. With level-by-level problems and easy-to-understand concepts, you'll be a Dynamic Programming pro in no time.<\/span>","borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"x":20,"y":315,"width":362,"height":119,"basedOn":"83d740a7-250d-49cb-b7d9-9712d7d52b7d","id":"8f22a9ff-495f-41ca-b7f2-b60d1aa3ab6b","type":"text"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"NONE","font":{"family":"Poppins"},"fontSize":38,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":1.1,"textAlign":"initial","padding":{"hasHiddenPadding":false,"horizontal":0,"vertical":0},"x":20,"y":172,"width":356,"height":137,"basedOn":"54cdc3d5-2ac7-4aa9-9aa7-364e59edb3df","content":"<span style=\"font-weight: 700; color: #fff\">Ready to take your career to new heights?<\/span>","tagName":"p","marginOffset":-33.629999999999995,"id":"d0a9448e-0825-4a27-afef-cf3753e1b025","type":"text","groupId":null},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundColor":{"color":{"r":0,"g":59,"b":173}},"type":"shape","x":17,"y":110,"width":47,"height":45,"mask":{"type":"star"},"id":"cab5dc4e-70e7-446a-9516-9aa3a621a79e","groupId":"19ca7721-30d1-48ea-bea9-e70051267aaf"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundColor":{"color":{"r":0,"g":59,"b":173}},"x":63,"y":110,"width":47,"height":45,"mask":{"type":"star"},"basedOn":"cab5dc4e-70e7-446a-9516-9aa3a621a79e","id":"5c602a45-e2cf-49cf-ae22-88ed66d35076","type":"shape","groupId":"19ca7721-30d1-48ea-bea9-e70051267aaf"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundColor":{"color":{"r":0,"g":59,"b":173}},"x":111,"y":110,"width":47,"height":45,"mask":{"type":"star"},"basedOn":"cab5dc4e-70e7-446a-9516-9aa3a621a79e","id":"ada07d4b-2570-4c81-9db5-3dd8141745b8","type":"shape","groupId":"19ca7721-30d1-48ea-bea9-e70051267aaf"}],"backgroundColor":{"color":{"r":255,"g":255,"b":255}},"animations":[{"id":"9dc0a40d-3421-405f-ab85-d52755a1b1d6","type":"effect-fly-in","flyInDir":"topToBottom","duration":1000,"delay":0,"targets":["d0a9448e-0825-4a27-afef-cf3753e1b025"]},{"id":"94e16e61-fbd4-449a-b495-f94e4141b349","type":"effect-fly-in","flyInDir":"topToBottom","duration":600,"delay":0,"targets":["8f22a9ff-495f-41ca-b7f2-b60d1aa3ab6b"]}],"id":"54247e4a-4c34-4389-9ef8-e2ad1e555aa1","defaultBackgroundElement":{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"x":1,"y":1,"width":1,"height":1,"mask":{"type":"rectangle"},"isBackground":true,"isDefaultBackground":true,"type":"shape","id":"a604e4f2-daba-4791-93e8-e72b50eb1cb3"},"pageAttachment":{"url":"https:\/\/www.interviewbit.com\/courses\/programming\/dynamic-programming\/?utm_source=ib&utm_medium=webstories&utm_campaign=how-to-solve-any-dynamic-programming-interview-question","icon":"https:\/\/assets.interviewbit.com\/assets\/ib-logo-904db47f8d2208f21a168bfe4851e0fdcc041f2487b6a8ec0b181d3724dbd012.png.gz","needsProxy":false,"ctaText":"Explore now"},"groups":{"19ca7721-30d1-48ea-bea9-e70051267aaf":{"name":"Group 1","isLocked":false}}},{"elements":[{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"x":48,"y":0,"width":330,"height":494,"mask":{"type":"rectangle"},"isBackground":true,"type":"image","id":"a604e4f2-daba-4791-93e8-e72b50eb1cb3","scale":100,"focalX":50,"focalY":50,"resource":{"type":"image","mimeType":"image\/jpeg","width":4000,"height":6000,"sizes":{"full":{"file":"media\/unsplash:VzJjPuk53sk","sourceUrl":"https:\/\/images.unsplash.com\/photo-1575089976121-8ed7b2a54265?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxzb2Z0d2FyZSUyMGRldmVsb3BlcnxlbnwwfHx8fDE2NzU3OTAyMTE&ixlib=rb-4.0.3&fm=jpg&w=4000&h=6000&fit=max","mimeType":"image\/jpeg","width":4000,"height":6000},"large":{"file":"media\/unsplash:VzJjPuk53sk","sourceUrl":"https:\/\/images.unsplash.com\/photo-1575089976121-8ed7b2a54265?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxzb2Z0d2FyZSUyMGRldmVsb3BlcnxlbnwwfHx8fDE2NzU3OTAyMTE&ixlib=rb-4.0.3&fm=jpg&w=3200&h=4800&fit=max","mimeType":"image\/jpeg","width":3200,"height":4800},"2400_3600":{"file":"media\/unsplash:VzJjPuk53sk","sourceUrl":"https:\/\/images.unsplash.com\/photo-1575089976121-8ed7b2a54265?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxzb2Z0d2FyZSUyMGRldmVsb3BlcnxlbnwwfHx8fDE2NzU3OTAyMTE&ixlib=rb-4.0.3&fm=jpg&w=2400&h=3600&fit=max","mimeType":"image\/jpeg","width":2400,"height":3600},"1600_2400":{"file":"media\/unsplash:VzJjPuk53sk","sourceUrl":"https:\/\/images.unsplash.com\/photo-1575089976121-8ed7b2a54265?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxzb2Z0d2FyZSUyMGRldmVsb3BlcnxlbnwwfHx8fDE2NzU3OTAyMTE&ixlib=rb-4.0.3&fm=jpg&w=1600&h=2400&fit=max","mimeType":"image\/jpeg","width":1600,"height":2400},"800_1200":{"file":"media\/unsplash:VzJjPuk53sk","sourceUrl":"https:\/\/images.unsplash.com\/photo-1575089976121-8ed7b2a54265?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxzb2Z0d2FyZSUyMGRldmVsb3BlcnxlbnwwfHx8fDE2NzU3OTAyMTE&ixlib=rb-4.0.3&fm=jpg&w=800&h=1200&fit=max","mimeType":"image\/jpeg","width":800,"height":1200},"web_stories_thumbnail":{"file":"media\/unsplash:VzJjPuk53sk","sourceUrl":"https:\/\/images.unsplash.com\/photo-1575089976121-8ed7b2a54265?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxzb2Z0d2FyZSUyMGRldmVsb3BlcnxlbnwwfHx8fDE2NzU3OTAyMTE&ixlib=rb-4.0.3&fm=jpg&w=340&h=510&fit=max","mimeType":"image\/jpeg","width":340,"height":510}},"isPlaceholder":false,"isExternal":true,"needsProxy":false,"id":"media\/unsplash:VzJjPuk53sk","baseColor":"#0c2626","blurHash":"LBEorfElXSNGBY0g=_IoKQ^*^hxu","creationDate":"2019-11-30T05:00:10Z","src":"https:\/\/images.unsplash.com\/photo-1575089976121-8ed7b2a54265?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxzb2Z0d2FyZSUyMGRldmVsb3BlcnxlbnwwfHx8fDE2NzU3OTAyMTE&ixlib=rb-4.0.3&fm=jpg&w=4000&h=6000&fit=max","alt":"man using laptop","attribution":{"author":{"displayName":"Procreator UX Design Studio","url":"https:\/\/unsplash.com\/@weareprocreator?utm_source=web_stories_wordpress&utm_medium=referral"},"registerUsageUrl":"https:\/\/media3p.googleapis.com\/v1\/media:registerUsage?token=Aa0pnNZMz4rx4EwVVqCuS0surHXtV2tfLvFeCbIkdSHocXI\/eiuwdi9qyTfnFfjkxtWe7N3csCyN8H796wS3eTwSEkSqfB8w6Ql9DFPeZSKMfP5uVIZK4aRgZw\/1YpYYtmKwhhx2yXbAbTxjXAjhFxEqwO8a90aj1WLliRK\/qTBPaaBv99ez3XmwlZFLa\/jxucHX86J17QGyohxE%2BNHIBmhTTZMNanflZkA5WcFPA0vErwUbb5lZcCYhg4NVJcC79\/%2BP"}},"overlay":{"color":{"r":0,"g":0,"b":0,"a":0.5}}},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"scale":100,"focalX":50,"focalY":50,"resource":{"type":"image","mimeType":"image\/png","creationDate":"2021-07-12T14:57:03","src":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2.png","width":2130,"height":708,"id":724,"alt":"InterviewBit-White-2","sizes":{"medium":{"file":"InterviewBit-White-2-300x100.png","width":300,"height":100,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-300x100.png"},"large":{"file":"InterviewBit-White-2-1024x340.png","width":1024,"height":340,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-1024x340.png"},"thumbnail":{"file":"InterviewBit-White-2-150x150.png","width":150,"height":150,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-150x150.png"},"medium_large":{"file":"InterviewBit-White-2-768x255.png","width":768,"height":255,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-768x255.png"},"1536x1536":{"file":"InterviewBit-White-2-1536x511.png","width":1536,"height":511,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-1536x511.png"},"2048x2048":{"file":"InterviewBit-White-2-2048x681.png","width":2048,"height":681,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-2048x681.png"},"web-stories-poster-portrait":{"file":"InterviewBit-White-2-640x708.png","width":640,"height":708,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-640x708.png"},"web-stories-poster-landscape":{"file":"InterviewBit-White-2-853x640.png","width":853,"height":640,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-853x640.png"},"web-stories-poster-square":{"file":"InterviewBit-White-2-640x640.png","width":640,"height":640,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-640x640.png"},"web-stories-publisher-logo":{"file":"InterviewBit-White-2-96x96.png","width":96,"height":96,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-96x96.png"},"web-stories-thumbnail":{"file":"InterviewBit-White-2-150x50.png","width":150,"height":50,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2-150x50.png"},"full":{"file":"InterviewBit-White-2.png","width":2130,"height":708,"mimeType":"image\/png","sourceUrl":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/07\/InterviewBit-White-2.png"}},"isOptimized":false,"isExternal":false},"x":-3,"y":-40,"width":180,"height":60,"mask":{"type":"rectangle"},"basedOn":"85da65c1-1fb2-40ba-8a02-41ca3ec7d153","id":"0c73adb7-3f12-4bdd-a5ab-60951e97428d","type":"image"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"NONE","font":{"family":"Poppins"},"fontSize":43,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":1.1,"textAlign":"initial","padding":{"hasHiddenPadding":false,"horizontal":0,"vertical":0},"x":31,"y":168,"width":364,"height":202,"basedOn":"d0a9448e-0825-4a27-afef-cf3753e1b025","content":"<span style=\"font-weight: 700; color: #fff\">Step Up Your Game with InterviewBit Web Stories<\/span>","tagName":"p","marginOffset":-13.199999999999989,"id":"b1c048a0-b995-4f62-8f59-e9a253eecfc3","type":"text"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"NONE","font":{"family":"Poppins"},"fontSize":202,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":1,"textAlign":"initial","padding":{"horizontal":0,"vertical":0},"x":20,"y":27,"width":81,"height":283,"basedOn":"aa4d9076-8e49-4cdc-9b36-e70e6fa1606d","content":"<span style=\"font-weight: 700; color: #fff\">\u201c<\/span>","id":"688d6104-4e44-45b2-9026-a9c8513ff7a1","type":"text"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"NONE","font":{"family":"Roboto"},"fontSize":23,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":1.2,"textAlign":"left","padding":{"locked":true,"hasHiddenPadding":false,"horizontal":0,"vertical":0},"content":"<span style=\"color: #fff\">Don't miss out on the chance to upskill yourself with IntervewBit's engaging web stories.&nbsp;<\/span>","borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"x":30,"y":370,"width":340,"height":82,"basedOn":"8f22a9ff-495f-41ca-b7f2-b60d1aa3ab6b","id":"b2dd71c5-ba5c-4422-b381-46a892720ad6","type":"text"}],"backgroundColor":{"color":{"r":255,"g":255,"b":255}},"animations":[{"id":"071a5260-50e7-4f11-9073-1a9d003ffe7e","type":"effect-fly-in","flyInDir":"topToBottom","duration":1000,"delay":0,"targets":["b1c048a0-b995-4f62-8f59-e9a253eecfc3"]},{"id":"59807e4a-34d2-44df-98c8-1f3dd64579fd","type":"effect-fly-in","flyInDir":"topToBottom","duration":600,"delay":0,"targets":["b2dd71c5-ba5c-4422-b381-46a892720ad6"]},{"id":"35964586-40ea-4fe5-8b17-11508aed34ae","type":"effect-background-pan-and-zoom","panDir":"rightToLeft","duration":2000,"delay":0,"zoomDirection":"scaleOut","targets":["a604e4f2-daba-4791-93e8-e72b50eb1cb3"]}],"id":"a27658a0-6f2c-44e2-9fcd-1060a35bd56d","defaultBackgroundElement":{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"x":1,"y":1,"width":1,"height":1,"mask":{"type":"rectangle"},"isBackground":true,"isDefaultBackground":true,"type":"shape","id":"f18f5834-e7a4-4085-8e20-2476ab8df02a"},"pageAttachment":{"url":"https:\/\/www.interviewbit.com\/blog\/web-stories\/?utm_source=Ib&utm_medium=webstories&utm_campaign=unlimited-learning-with-engaging-web-stories","icon":"","needsProxy":false,"ctaText":"SWIPE UP"}}],"fonts":{"Anton":{"family":"Anton","fallbacks":["sans-serif"],"weights":[400],"styles":["regular"],"variants":[[0,400]],"service":"fonts.google.com","metrics":{"upm":2048,"asc":2409,"des":-674,"tAsc":2409,"tDes":-674,"tLGap":0,"wAsc":2876,"wDes":674,"xH":1500,"capH":1760,"yMin":-667,"yMax":2874,"hAsc":2409,"hDes":-674,"lGap":0}},"Roboto":{"family":"Roboto","fallbacks":["sans-serif"],"weights":[100,300,400,500,700,900],"styles":["italic","regular"],"variants":[[0,100],[1,100],[0,300],[1,300],[0,400],[1,400],[0,500],[1,500],[0,700],[1,700],[0,900],[1,900]],"service":"fonts.google.com","metrics":{"upm":2048,"asc":1900,"des":-500,"tAsc":1536,"tDes":-512,"tLGap":102,"wAsc":1946,"wDes":512,"xH":1082,"capH":1456,"yMin":-555,"yMax":2163,"hAsc":1900,"hDes":-500,"lGap":0}},"Darker Grotesque":{"family":"Darker Grotesque","fallbacks":["sans-serif"],"weights":[300,400,500,600,700,800,900],"styles":["regular"],"variants":[[0,300],[0,400],[0,500],[0,600],[0,700],[0,800],[0,900]],"service":"fonts.google.com","metrics":{"upm":1000,"asc":1060,"des":-296,"tAsc":1060,"tDes":-296,"tLGap":0,"wAsc":1060,"wDes":296,"xH":406,"capH":563,"yMin":-296,"yMax":1060,"hAsc":1060,"hDes":-296,"lGap":0}},"Poppins":{"family":"Poppins","fallbacks":["sans-serif"],"weights":[100,200,300,400,500,600,700,800,900],"styles":["italic","regular"],"variants":[[0,100],[1,100],[0,200],[1,200],[0,300],[1,300],[0,400],[1,400],[0,500],[1,500],[0,600],[1,600],[0,700],[1,700],[0,800],[1,800],[0,900],[1,900]],"service":"fonts.google.com","metrics":{"upm":1000,"asc":1050,"des":-350,"tAsc":1050,"tDes":-350,"tLGap":100,"wAsc":1135,"wDes":627,"xH":548,"capH":698,"yMin":-572,"yMax":1065,"hAsc":1050,"hDes":-350,"lGap":100}}},"autoAdvance":true,"defaultPageDuration":7,"currentStoryStyles":{"colors":[]}},"style_presets":{"colors":[{"color":{"r":157,"g":100,"b":32}},{"color":{"r":0,"g":0,"b":0}}],"textStyles":[]},"story_poster":{"id":17704,"url":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/04\/cropped-Follow-these-steps-to-solve-any-Dynamic-Programming-interview-problem.png","width":640,"height":853,"needsProxy":false},"_links":{"self":[{"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/web-stories\/v1\/web-story\/17693"}],"collection":[{"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/web-stories\/v1\/web-story"}],"about":[{"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/types\/web-story"}],"author":[{"embeddable":true,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/web-stories\/v1\/users\/21"}],"version-history":[{"count":4,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/web-stories\/v1\/web-story\/17693\/revisions"}],"predecessor-version":[{"id":17707,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/web-stories\/v1\/web-story\/17693\/revisions\/17707"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/web-stories\/v1\/media\/17704"}],"wp:attachment":[{"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/web-stories\/v1\/media?parent=17693"}],"wp:term":[{"taxonomy":"web_story_category","embeddable":true,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/web-stories\/v1\/web_story_category?post=17693"},{"taxonomy":"web_story_tag","embeddable":true,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/web-stories\/v1\/web_story_tag?post=17693"}],"wp:lock":[{"embeddable":true,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/web-stories\/v1\/web-story\/17693\/lock"}],"wp:publisherlogo":[{"embeddable":true,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/web-stories\/v1\/media\/1082"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}