{"id":15746,"date":"2023-01-20T18:52:52","date_gmt":"2023-01-20T13:22:52","guid":{"rendered":"https:\/\/www.interviewbit.com\/blog\/?post_type=web-story&#038;p=15746"},"modified":"2023-01-20T18:52:53","modified_gmt":"2023-01-20T13:22:53","slug":"how-to-find-longest-common-substring","status":"publish","type":"web-story","link":"https:\/\/www.interviewbit.com\/blog\/web-stories\/how-to-find-longest-common-substring\/","title":{"rendered":"How to find Longest Common Substring?"},"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=Roboto%3Awght%40400%3B700&amp;family=Darker+Grotesque%3Awght%40400%3B700&amp;family=Anton\" rel=\"stylesheet\"\/><link href=\"https:\/\/images.unsplash.com\/photo-1523961131990-5ea7c61b2107?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxfHxiaWclMjBkYXRhfGVufDB8fHx8MTY3MjY2MDQyNA&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=2048&amp;h=1536&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>How to find Longest Common Substring?<\/title><link rel=\"canonical\" href=\"https:\/\/www.interviewbit.com\/blog\/?post_type=web-story&amp;p=15746\"\/><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=\"How to find Longest Common Substring?\" poster-portrait-src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/01\/cropped-longest-common-substring-20th.png\"><amp-story-page id=\"d1e9a7c2-404d-415a-a2eb-eea40554940b\" auto-advance-after=\"7s\"><amp-story-grid-layer template=\"vertical\" aspect-ratio=\"412:618\" class=\"grid-layer\"><\/p>\n<div class=\"page-fullbleed-area\" style=\"background-color:#0c2640\">\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-8713361c-f03a-487f-9a51-a0f98b9ddadb\">\n<div style=\"position:absolute;width:237.03704%;height:100%;left:-68.51852%;top:0%\" data-leaf-element=\"true\"><amp-img layout=\"fill\" src=\"https:\/\/images.unsplash.com\/photo-1523961131990-5ea7c61b2107?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxfHxiaWclMjBkYXRhfGVufDB8fHx8MTY3MjY2MDQyNA&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=2048&amp;h=1536&amp;fit=max\" alt=\"geometric shape digital wallpaper\" srcSet=\"https:\/\/images.unsplash.com\/photo-1523961131990-5ea7c61b2107?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxfHxiaWclMjBkYXRhfGVufDB8fHx8MTY3MjY2MDQyNA&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=2048&amp;h=1536&amp;fit=max 2048w,https:\/\/images.unsplash.com\/photo-1523961131990-5ea7c61b2107?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxfHxiaWclMjBkYXRhfGVufDB8fHx8MTY3MjY2MDQyNA&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=1638&amp;h=1229&amp;fit=max 1638w,https:\/\/images.unsplash.com\/photo-1523961131990-5ea7c61b2107?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxfHxiaWclMjBkYXRhfGVufDB8fHx8MTY3MjY2MDQyNA&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=1228&amp;h=921&amp;fit=max 1228w,https:\/\/images.unsplash.com\/photo-1523961131990-5ea7c61b2107?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxfHxiaWclMjBkYXRhfGVufDB8fHx8MTY3MjY2MDQyNA&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=819&amp;h=614&amp;fit=max 819w,https:\/\/images.unsplash.com\/photo-1523961131990-5ea7c61b2107?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxfHxiaWclMjBkYXRhfGVufDB8fHx8MTY3MjY2MDQyNA&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=409&amp;h=307&amp;fit=max 409w,https:\/\/images.unsplash.com\/photo-1523961131990-5ea7c61b2107?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxfHxiaWclMjBkYXRhfGVufDB8fHx8MTY3MjY2MDQyNA&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=340&amp;h=255&amp;fit=max 340w\" sizes=\"(min-width: 1024px) 107vh, 238vw\" 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;top:-6.31068%;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-96332792-fe49-4105-a90e-4f4a9d61ad55\">\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:5.33981%;top:45.63107%;width:76.69903%;height:33.81877%;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.6329113924050633% 0.6329113924050633% 0.6329113924050633% 0.6329113924050633% \/ 0.9569377990430622% 0.9569377990430622% 0.9569377990430622% 0.9569377990430622%\" id=\"el-95a17566-0eff-4d0a-a9a1-c1eab9f25976\">\n<h1 id=\"how-to-find-longest-common-substring\" class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:1.3597705696202531% 0;font-family:&quot;Roboto&quot;,sans-serif;font-size:0.809061em;line-height:1;text-align:left;padding:0;color:#000000\"><span><span style=\"font-weight: 700; color: #fff\">How to find Longest Common Substring?<\/span><\/span><\/h1>\n<\/div>\n<\/div>\n<div style=\"position:absolute;pointer-events:none;left:5.58252%;top:81.06796%;width:91.26214%;height:5.66343%;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.5319148936170213% 0.5319148936170213% 0.5319148936170213% 0.5319148936170213% \/ 5.714285714285714% 5.714285714285714% 5.714285714285714% 5.714285714285714%\" id=\"el-cd5e9604-8a06-49c9-ac81-19784a284f87\">\n<h2 id=\"lets-dive-in\" class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:-0.11220079787234044% 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=\"color: #347eff\">Let&#8217;s dive in!<\/span><\/span><\/h2>\n<\/div>\n<\/div>\n<div style=\"position:absolute;pointer-events:none;left:3.8835%;top:90.7767%;width:36.16505%;height:14.23948%;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-1635eb8e-c97a-4bdf-98ea-5a430567b7fd\">\n<div style=\"position:absolute;width:100%;height:127.98857%;left:0%;top:-13.99429%\" data-leaf-element=\"true\"><amp-img layout=\"fill\" src=\"https:\/\/media.tenor.com\/8uSPaXIUm7UAAAAi\/arrow.gif\" alt=\"Arrow Sticker\" srcSet=\"https:\/\/media.tenor.com\/8uSPaXIUm7UAAAAi\/arrow.gif 127w,https:\/\/media.tenor.com\/8uSPaXIUm7UAAAAk\/arrow.gif 90w\" sizes=\"(min-width: 1024px) 16vh, 36vw\" disable-inline-width=\"true\"><\/amp-img><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p><\/amp-story-grid-layer><\/amp-story-page><amp-story-page id=\"ae40903e-5d0a-4461-bb14-d9db3bfd6b21\" auto-advance-after=\"7s\"><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-b7dc7916-c06a-43ae-8547-f19edab656a1\",\"keyframes\":{\"opacity\":[0,1]},\"delay\":0,\"duration\":2000,\"easing\":\"cubic-bezier(.3,0,.55,1)\",\"fill\":\"both\"}]<\/script><\/amp-story-animation><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-a075603d-9f19-438b-874a-cde35444ff14\",\"keyframes\":{\"transform\":[\"scale(0.3333333333333333)\",\"scale(1)\"]},\"delay\":0,\"duration\":2000,\"easing\":\"cubic-bezier(.3,0,.55,1)\",\"fill\":\"forwards\"}]<\/script><\/amp-story-animation><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-59479824-7b27-4e5e-a997-85df97c1a9c1 [data-leaf-element=\\\"true\\\"]\",\"keyframes\":{\"transform\":[\"translate(0%, 0%) scale(1.5)\",\"translate(0%, 0%) scale(1)\"]},\"delay\":0,\"duration\":2000,\"easing\":\"cubic-bezier(.3,0,.55,1)\",\"fill\":\"forwards\"}]<\/script><\/amp-story-animation><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-aeaf947c-26ee-4490-942d-a5d1e6094d4d\",\"keyframes\":{\"opacity\":[0,1]},\"delay\":0,\"duration\":2000,\"easing\":\"cubic-bezier(.3,0,.55,1)\",\"fill\":\"both\"}]<\/script><\/amp-story-animation><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-c230488c-238b-4cc6-9bbd-53d249bd223c\",\"keyframes\":{\"transform\":[\"scale(0.3333333333333333)\",\"scale(1)\"]},\"delay\":0,\"duration\":2000,\"easing\":\"cubic-bezier(.3,0,.55,1)\",\"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:#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 id=\"anim-59479824-7b27-4e5e-a997-85df97c1a9c1\" 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-76638dd5-e923-4c37-8934-99f03447a159\">\n<div style=\"position:absolute;width:266.31253%;height:100%;left:-83.15627%;top:0%\" data-leaf-element=\"true\"><amp-img layout=\"fill\" src=\"https:\/\/images.unsplash.com\/photo-1573164713712-03790a178651?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzNXx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY2NjM2MDY5Ng&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=6016&amp;h=4016&amp;fit=max\" alt=\"woman in black shirt using laptop computer\" srcSet=\"https:\/\/images.unsplash.com\/photo-1573164713712-03790a178651?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzNXx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY2NjM2MDY5Ng&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=6016&amp;h=4016&amp;fit=max 6016w,https:\/\/images.unsplash.com\/photo-1573164713712-03790a178651?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzNXx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY2NjM2MDY5Ng&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=4812&amp;h=3212&amp;fit=max 4812w,https:\/\/images.unsplash.com\/photo-1573164713712-03790a178651?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzNXx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY2NjM2MDY5Ng&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=3609&amp;h=2409&amp;fit=max 3609w,https:\/\/images.unsplash.com\/photo-1573164713712-03790a178651?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzNXx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY2NjM2MDY5Ng&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=2406&amp;h=1606&amp;fit=max 2406w,https:\/\/images.unsplash.com\/photo-1573164713712-03790a178651?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzNXx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY2NjM2MDY5Ng&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=1203&amp;h=803&amp;fit=max 1203w,https:\/\/images.unsplash.com\/photo-1573164713712-03790a178651?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzNXx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY2NjM2MDY5Ng&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>\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;top:-6.31068%;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-a3bb84b5-e208-4e2a-936f-5611c92d7d16\">\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.76699%;top:34.46602%;width:85.43689%;height:41.42395%;opacity:1\">\n<div id=\"anim-b7dc7916-c06a-43ae-8547-f19edab656a1\" 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-a075603d-9f19-438b-874a-cde35444ff14\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0;--initial-opacity:1;--initial-transform:scale(0.3333333333333333)\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0;border-radius:0.5681818181818182% 0.5681818181818182% 0.5681818181818182% 0.5681818181818182% \/ 0.78125% 0.78125% 0.78125% 0.78125%\" id=\"el-01463911-9ace-441d-a6f8-4307552a5552\">\n<h2 id=\"given-two-strings-the-task-is-to-find-longest-common-substring-in-same-order-present-in-given-strings-remember-that-a-substring-is-a-sequence-of-characters-that-appears-consecutively-within-a-stri\" class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:0.6647727272727272% 0;font-family:&quot;Darker Grotesque&quot;,sans-serif;font-size:0.485437em;line-height:1.2;text-align:left;padding:0;color:#000000\"><span><span style=\"color: #fff\">Given two strings, the task is to find longest common substring, in same order, present in given strings. Remember that a substring is a sequence of characters that appears consecutively within a string.<\/span><\/span><\/h2>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div style=\"position:absolute;pointer-events:none;left:0;top:4.69256%;width:99.51456%;height:11.65049%;opacity:1\">\n<div id=\"anim-aeaf947c-26ee-4490-942d-a5d1e6094d4d\" 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-c230488c-238b-4cc6-9bbd-53d249bd223c\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0;--initial-opacity:1;--initial-transform:scale(0.3333333333333333)\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0;border-radius:0.4878048780487805% 0.4878048780487805% 0.4878048780487805% 0.4878048780487805% \/ 2.7777777777777777% 2.7777777777777777% 2.7777777777777777% 2.7777777777777777%;background-clip:content-box;background-color:#052258\" id=\"el-bf868b6a-256e-480a-bfe1-970aef991286\">\n<h1 id=\"problem-statement\" class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:2.613658536585366% 0;font-family:&quot;Darker Grotesque&quot;,sans-serif;font-size:0.760518em;line-height:0.9;text-align:center;padding:0.975609756097561% 1.951219512195122%;color:#000000\"><span><span style=\"font-weight: 700; color: #3372e0\">Problem Statement<\/span><\/span><\/h1>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p><\/amp-story-grid-layer><amp-story-page-outlink layout=\"nodisplay\" cta-image=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/10\/14-Subset-Sum-Problem.jpg\"><a href=\"https:\/\/www.interviewbit.com\/blog\/longest-common-substring\/?utm_source=Ib&amp;utm_medium=webstories&amp;utm_campaign=longest-common-substring\" rel=\"\">Find out now<\/a><\/amp-story-page-outlink><\/amp-story-page><amp-story-page id=\"89c46d12-909f-4a7b-b582-777f409a4ac2\" auto-advance-after=\"7s\"><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-c6011d30-4223-4519-8c03-e3812b7bf6f5\",\"keyframes\":{\"opacity\":[0,1]},\"delay\":0,\"duration\":2000,\"easing\":\"cubic-bezier(.3,0,.55,1)\",\"fill\":\"both\"}]<\/script><\/amp-story-animation><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-19249939-ff91-449f-a1f1-2ad4b4ad94a0\",\"keyframes\":{\"transform\":[\"scale(0.3333333333333333)\",\"scale(1)\"]},\"delay\":0,\"duration\":2000,\"easing\":\"cubic-bezier(.3,0,.55,1)\",\"fill\":\"forwards\"}]<\/script><\/amp-story-animation><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-a5b9f18e-6ffc-4f36-82b1-587d00e219ab [data-leaf-element=\\\"true\\\"]\",\"keyframes\":{\"transform\":[\"translate(0%, 0%) scale(1.5)\",\"translate(0%, 0%) scale(1)\"]},\"delay\":0,\"duration\":2000,\"easing\":\"cubic-bezier(.3,0,.55,1)\",\"fill\":\"forwards\"}]<\/script><\/amp-story-animation><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-d9b8e9ac-bf74-41da-afea-c684d74b3f7f\",\"keyframes\":{\"opacity\":[0,1]},\"delay\":0,\"duration\":2000,\"easing\":\"cubic-bezier(.3,0,.55,1)\",\"fill\":\"both\"}]<\/script><\/amp-story-animation><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-63cafd94-5c92-4021-9cd1-b164a1fc1e85\",\"keyframes\":{\"transform\":[\"scale(0.3333333333333333)\",\"scale(1)\"]},\"delay\":0,\"duration\":2000,\"easing\":\"cubic-bezier(.3,0,.55,1)\",\"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-a5b9f18e-6ffc-4f36-82b1-587d00e219ab\" 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-76638dd5-e923-4c37-8934-99f03447a159\">\n<div style=\"position:absolute;width:266.31253%;height:100%;left:-83.15627%;top:0%\" data-leaf-element=\"true\"><amp-img layout=\"fill\" src=\"https:\/\/images.unsplash.com\/photo-1573164574397-dd250bc8a598?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw3OHx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjcwMzM2Mjk2&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=6016&amp;h=4016&amp;fit=max\" alt=\"photography of three women sits beside table inside room during daytime\" srcSet=\"https:\/\/images.unsplash.com\/photo-1573164574397-dd250bc8a598?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw3OHx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjcwMzM2Mjk2&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=6016&amp;h=4016&amp;fit=max 6016w,https:\/\/images.unsplash.com\/photo-1573164574397-dd250bc8a598?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw3OHx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjcwMzM2Mjk2&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=4812&amp;h=3212&amp;fit=max 4812w,https:\/\/images.unsplash.com\/photo-1573164574397-dd250bc8a598?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw3OHx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjcwMzM2Mjk2&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=3609&amp;h=2409&amp;fit=max 3609w,https:\/\/images.unsplash.com\/photo-1573164574397-dd250bc8a598?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw3OHx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjcwMzM2Mjk2&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=2406&amp;h=1606&amp;fit=max 2406w,https:\/\/images.unsplash.com\/photo-1573164574397-dd250bc8a598?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw3OHx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjcwMzM2Mjk2&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=1203&amp;h=803&amp;fit=max 1203w,https:\/\/images.unsplash.com\/photo-1573164574397-dd250bc8a598?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw3OHx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjcwMzM2Mjk2&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>\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;top:-6.31068%;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-90701d05-70b8-48ba-9066-72199e99b3ce\">\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:9.46602%;top:17.79935%;width:85.43689%;height:18.28479%;opacity:1\">\n<div id=\"anim-c6011d30-4223-4519-8c03-e3812b7bf6f5\" 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-19249939-ff91-449f-a1f1-2ad4b4ad94a0\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0;--initial-opacity:1;--initial-transform:scale(0.3333333333333333)\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0;border-radius:0.5681818181818182% 0.5681818181818182% 0.5681818181818182% 0.5681818181818182% \/ 1.7699115044247788% 1.7699115044247788% 1.7699115044247788% 1.7699115044247788%\" id=\"el-94bfec13-62c1-4925-8c9b-5e13821d634a\">\n<h2 id=\"lets-take-an-example-to-understand-the-problem-better\" class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:0.6647727272727272% 0;font-family:&quot;Darker Grotesque&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: #347eff\">Let&#8217;s take an example to understand the problem better.<\/span><\/span><\/h2>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div style=\"position:absolute;pointer-events:none;left:9.46602%;top:43.20388%;width:85.43689%;height:41.42395%;opacity:1\">\n<div id=\"anim-d9b8e9ac-bf74-41da-afea-c684d74b3f7f\" 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-63cafd94-5c92-4021-9cd1-b164a1fc1e85\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0;--initial-opacity:1;--initial-transform:scale(0.3333333333333333)\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0;border-radius:0.5681818181818182% 0.5681818181818182% 0.5681818181818182% 0.5681818181818182% \/ 0.78125% 0.78125% 0.78125% 0.78125%\" id=\"el-beb9cd08-b670-4372-bebb-c5ab5af8e430\">\n<h2 id=\"input-s1-dadef-s2-adwce-output-2-explanation-substring-ad-of-length-2-is-the-longest\" class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:0.6647727272727272% 0;font-family:&quot;Darker Grotesque&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\">Input s1: <\/span><span style=\"color: #fff\">\u201cdadef\u201d&nbsp;<\/span><br \/>\n<span style=\"color: #fff\">s2: \u201cadwce\u201d&nbsp;<\/span><\/p>\n<p><span style=\"font-weight: 700; color: #fff\">Output: <\/span><span style=\"color: #fff\">2&nbsp;<\/span><\/p>\n<p><span style=\"font-weight: 700; color: #fff\">Explanation:<\/span><span style=\"color: #fff\"> Substring \u201cad\u201d of length 2 is the longest.<\/span><\/span><\/h2>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p><\/amp-story-grid-layer><amp-story-page-outlink layout=\"nodisplay\" cta-image=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/10\/Longest-Common-Substring.jpg\"><a href=\"https:\/\/www.interviewbit.com\/blog\/longest-common-substring\/?utm_source=Ib&amp;utm_medium=webstories&amp;utm_campaign=longest-common-substring\" rel=\"\">Check more examples<\/a><\/amp-story-page-outlink><\/amp-story-page><amp-story-page id=\"de3e1538-90d1-44c3-9dc1-e9eb15aea441\" auto-advance-after=\"7s\"><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-cd06f1db-8ef2-4195-ad94-ce8caf160783\",\"keyframes\":{\"opacity\":[0,1]},\"delay\":0,\"duration\":2000,\"easing\":\"cubic-bezier(.3,0,.55,1)\",\"fill\":\"both\"}]<\/script><\/amp-story-animation><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-16674728-1334-4883-9bb2-bee951879987\",\"keyframes\":{\"transform\":[\"scale(0.3333333333333333)\",\"scale(1)\"]},\"delay\":0,\"duration\":2000,\"easing\":\"cubic-bezier(.3,0,.55,1)\",\"fill\":\"forwards\"}]<\/script><\/amp-story-animation><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-c8bac764-1986-4278-ae9d-db70548f90e7 [data-leaf-element=\\\"true\\\"]\",\"keyframes\":{\"transform\":[\"translate(0%, 0%) scale(1.5)\",\"translate(0%, 0%) scale(1)\"]},\"delay\":0,\"duration\":2000,\"easing\":\"cubic-bezier(.3,0,.55,1)\",\"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:#d9d9d9\">\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-c8bac764-1986-4278-ae9d-db70548f90e7\" 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-76638dd5-e923-4c37-8934-99f03447a159\">\n<div style=\"position:absolute;width:266.31253%;height:100%;left:-83.15627%;top:0%\" data-leaf-element=\"true\"><amp-img layout=\"fill\" src=\"https:\/\/images.unsplash.com\/photo-1573164574511-73c773193279?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxMDh8fHNvZnR3YXJlJTIwZGV2ZWxvcGVyfGVufDB8fHx8MTY3MDMzNjMzMA&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=6016&amp;h=4016&amp;fit=max\" alt=\"photography of people inside room during daytime\" srcSet=\"https:\/\/images.unsplash.com\/photo-1573164574511-73c773193279?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxMDh8fHNvZnR3YXJlJTIwZGV2ZWxvcGVyfGVufDB8fHx8MTY3MDMzNjMzMA&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=6016&amp;h=4016&amp;fit=max 6016w,https:\/\/images.unsplash.com\/photo-1573164574511-73c773193279?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxMDh8fHNvZnR3YXJlJTIwZGV2ZWxvcGVyfGVufDB8fHx8MTY3MDMzNjMzMA&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=4812&amp;h=3212&amp;fit=max 4812w,https:\/\/images.unsplash.com\/photo-1573164574511-73c773193279?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxMDh8fHNvZnR3YXJlJTIwZGV2ZWxvcGVyfGVufDB8fHx8MTY3MDMzNjMzMA&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=3609&amp;h=2409&amp;fit=max 3609w,https:\/\/images.unsplash.com\/photo-1573164574511-73c773193279?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxMDh8fHNvZnR3YXJlJTIwZGV2ZWxvcGVyfGVufDB8fHx8MTY3MDMzNjMzMA&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=2406&amp;h=1606&amp;fit=max 2406w,https:\/\/images.unsplash.com\/photo-1573164574511-73c773193279?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxMDh8fHNvZnR3YXJlJTIwZGV2ZWxvcGVyfGVufDB8fHx8MTY3MDMzNjMzMA&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=1203&amp;h=803&amp;fit=max 1203w,https:\/\/images.unsplash.com\/photo-1573164574511-73c773193279?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxMDh8fHNvZnR3YXJlJTIwZGV2ZWxvcGVyfGVufDB8fHx8MTY3MDMzNjMzMA&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>\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;top:-6.31068%;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-ca607fc3-47ce-46f2-be0f-336346011aab\">\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:8.73786%;top:38.51133%;width:82.76699%;height:29.77346%;opacity:1\">\n<div id=\"anim-cd06f1db-8ef2-4195-ad94-ce8caf160783\" 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-16674728-1334-4883-9bb2-bee951879987\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0;--initial-opacity:1;--initial-transform:scale(0.3333333333333333)\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0;border-radius:0.5865102639296188% 0.5865102639296188% 0.5865102639296188% 0.5865102639296188% \/ 1.0869565217391304% 1.0869565217391304% 1.0869565217391304% 1.0869565217391304%\" id=\"el-91e1f96d-98c1-4640-bbd8-2ceb2f611100\">\n<h2 id=\"are-you-curious-about-the-different-approaches-to-find-out-the-longest-common-substring-lets-dive-in-and-explore-them-together\" class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:0.6862170087976539% 0;font-family:&quot;Darker Grotesque&quot;,sans-serif;font-size:0.485437em;line-height:1.2;text-align:left;padding:0;color:#000000\"><span><span style=\"color: #fff\">Are you curious about the different approaches to find out the longest common substring? Let&#8217;s dive in and explore them together!<\/span><\/span><\/h2>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p><\/amp-story-grid-layer><amp-story-page-outlink layout=\"nodisplay\" cta-image=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/10\/Longest-Common-Substring.jpg\"><a href=\"https:\/\/www.interviewbit.com\/blog\/longest-common-substring\/?utm_source=Ib&amp;utm_medium=webstories&amp;utm_campaign=longest-common-substring\" rel=\"\">Explore now<\/a><\/amp-story-page-outlink><\/amp-story-page><amp-story-page id=\"9e5d6a53-c17c-415a-b590-e6df6d6fd3f4\" auto-advance-after=\"7s\"><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-bab1ec0f-1ffa-4da5-a518-453670eaebb8 [data-leaf-element=\\\"true\\\"]\",\"keyframes\":{\"transform\":[\"translate(0%, 0%) scale(1.5)\",\"translate(0%, 0%) scale(1)\"]},\"delay\":0,\"duration\":2000,\"easing\":\"cubic-bezier(.3,0,.55,1)\",\"fill\":\"forwards\"}]<\/script><\/amp-story-animation><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-f4989023-cb0c-4ec2-9b39-9bac43519681\",\"keyframes\":{\"opacity\":[0,1]},\"delay\":0,\"duration\":2000,\"easing\":\"cubic-bezier(.3,0,.55,1)\",\"fill\":\"both\"}]<\/script><\/amp-story-animation><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-c7ad0aa7-c493-4158-9231-c06d9d6a7d7c\",\"keyframes\":{\"transform\":[\"scale(0.3333333333333333)\",\"scale(1)\"]},\"delay\":0,\"duration\":2000,\"easing\":\"cubic-bezier(.3,0,.55,1)\",\"fill\":\"forwards\"}]<\/script><\/amp-story-animation><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-83678afc-d01a-463b-bd5b-3c2f335dd48c\",\"keyframes\":{\"opacity\":[0,1]},\"delay\":0,\"duration\":2000,\"easing\":\"cubic-bezier(.3,0,.55,1)\",\"fill\":\"both\"}]<\/script><\/amp-story-animation><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-53e53a13-7091-4f17-b457-92eb605e04cc\",\"keyframes\":{\"transform\":[\"scale(0.3333333333333333)\",\"scale(1)\"]},\"delay\":0,\"duration\":2000,\"easing\":\"cubic-bezier(.3,0,.55,1)\",\"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:#f3a673\">\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-bab1ec0f-1ffa-4da5-a518-453670eaebb8\" 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-27f2951c-8b6e-4772-8cc9-8a5b431fd5c6\">\n<div style=\"position:absolute;width:266.31253%;height:100%;left:-83.15627%;top:0%\" data-leaf-element=\"true\"><amp-img layout=\"fill\" src=\"https:\/\/images.unsplash.com\/photo-1573165759995-5865a394a1aa?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw2M3x8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjY5OTAyNjU0&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=6016&amp;h=4016&amp;fit=max\" alt=\"people sitting beside rectangular brown table with laptops\" srcSet=\"https:\/\/images.unsplash.com\/photo-1573165759995-5865a394a1aa?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw2M3x8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjY5OTAyNjU0&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=6016&amp;h=4016&amp;fit=max 6016w,https:\/\/images.unsplash.com\/photo-1573165759995-5865a394a1aa?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw2M3x8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjY5OTAyNjU0&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=4812&amp;h=3212&amp;fit=max 4812w,https:\/\/images.unsplash.com\/photo-1573165759995-5865a394a1aa?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw2M3x8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjY5OTAyNjU0&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=3609&amp;h=2409&amp;fit=max 3609w,https:\/\/images.unsplash.com\/photo-1573165759995-5865a394a1aa?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw2M3x8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjY5OTAyNjU0&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=2406&amp;h=1606&amp;fit=max 2406w,https:\/\/images.unsplash.com\/photo-1573165759995-5865a394a1aa?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw2M3x8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjY5OTAyNjU0&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=1203&amp;h=803&amp;fit=max 1203w,https:\/\/images.unsplash.com\/photo-1573165759995-5865a394a1aa?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw2M3x8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjY5OTAyNjU0&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>\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;top:-6.31068%;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-f24b57dc-e5b9-416a-be22-4a071ebd4794\">\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:35.27508%;width:85.43689%;height:24.11003%;opacity:1\">\n<div id=\"anim-f4989023-cb0c-4ec2-9b39-9bac43519681\" 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-c7ad0aa7-c493-4158-9231-c06d9d6a7d7c\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0;--initial-opacity:1;--initial-transform:scale(0.3333333333333333)\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0;border-radius:0.5681818181818182% 0.5681818181818182% 0.5681818181818182% 0.5681818181818182% \/ 1.342281879194631% 1.342281879194631% 1.342281879194631% 1.342281879194631%\" id=\"el-9cdf83be-84a7-4e37-9e13-228230d7f1b6\">\n<h2 id=\"the-simple-approach-checks-for-every-substring-of-sequence-1-whether-it-is-also-a-substring-in-sequence-2\" class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:0.6647727272727272% 0;font-family:&quot;Darker Grotesque&quot;,sans-serif;font-size:0.485437em;line-height:1.2;text-align:left;padding:0;color:#000000\"><span><span style=\"color: #fff\">The simple approach checks for every substring of sequence 1 whether it is also a substring in sequence 2.<\/span><\/span><\/h2>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div style=\"position:absolute;pointer-events:none;left:0;top:4.69256%;width:99.51456%;height:11.48867%;opacity:1\">\n<div id=\"anim-83678afc-d01a-463b-bd5b-3c2f335dd48c\" 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-53e53a13-7091-4f17-b457-92eb605e04cc\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0;--initial-opacity:1;--initial-transform:scale(0.3333333333333333)\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0;border-radius:0.4878048780487805% 0.4878048780487805% 0.4878048780487805% 0.4878048780487805% \/ 2.8169014084507045% 2.8169014084507045% 2.8169014084507045% 2.8169014084507045%;background-clip:content-box;background-color:#052258\" id=\"el-bf031369-9acb-4a1f-a10c-256e58b91515\">\n<h1 id=\"simple-approach\" class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:2.613658536585366% 0;font-family:&quot;Darker Grotesque&quot;,sans-serif;font-size:0.760518em;line-height:0.9;text-align:center;padding:0.975609756097561% 1.951219512195122%;color:#000000\"><span><span style=\"font-weight: 700; color: #3372e0\">Simple Approach<\/span><\/span><\/h1>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p><\/amp-story-grid-layer><amp-story-page-outlink layout=\"nodisplay\" cta-image=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/10\/Longest-Common-Substring.jpg\"><a href=\"https:\/\/www.interviewbit.com\/blog\/longest-common-substring\/?utm_source=Ib&amp;utm_medium=webstories&amp;utm_campaign=longest-common-substring\" rel=\"\">Checkout its algorithm<\/a><\/amp-story-page-outlink><\/amp-story-page><amp-story-page id=\"cf434d3e-3132-4b3c-87e0-5ae80860d37a\" auto-advance-after=\"7s\"><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-0274c0df-e386-4fbb-a930-3cb34a546146 [data-leaf-element=\\\"true\\\"]\",\"keyframes\":{\"transform\":[\"translate(0%, 0%) scale(1.5)\",\"translate(0%, 0%) scale(1)\"]},\"delay\":0,\"duration\":2000,\"easing\":\"cubic-bezier(.3,0,.55,1)\",\"fill\":\"forwards\"}]<\/script><\/amp-story-animation><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-f2c64fcc-23ac-423f-bcce-8b6515ba82a0\",\"keyframes\":{\"opacity\":[0,1]},\"delay\":0,\"duration\":2000,\"easing\":\"cubic-bezier(.3,0,.55,1)\",\"fill\":\"both\"}]<\/script><\/amp-story-animation><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-31ce9bf7-975d-4b04-95c2-0da4b9f42d44\",\"keyframes\":{\"transform\":[\"scale(0.3333333333333333)\",\"scale(1)\"]},\"delay\":0,\"duration\":2000,\"easing\":\"cubic-bezier(.3,0,.55,1)\",\"fill\":\"forwards\"}]<\/script><\/amp-story-animation><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-7eb19caf-6ce2-4262-ba59-adc0b9768157\",\"keyframes\":{\"opacity\":[0,1]},\"delay\":0,\"duration\":2000,\"easing\":\"cubic-bezier(.3,0,.55,1)\",\"fill\":\"both\"}]<\/script><\/amp-story-animation><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-a325329f-10ca-4e4f-823d-b4bbedabd3d6\",\"keyframes\":{\"transform\":[\"scale(0.3333333333333333)\",\"scale(1)\"]},\"delay\":0,\"duration\":2000,\"easing\":\"cubic-bezier(.3,0,.55,1)\",\"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:#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 id=\"anim-0274c0df-e386-4fbb-a930-3cb34a546146\" 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-4bea2dab-2033-49a6-a9a8-b6dc345abb9c\">\n<div style=\"position:absolute;width:266.31253%;height:100%;left:-83.15627%;top:0%\" data-leaf-element=\"true\"><amp-img layout=\"fill\" src=\"https:\/\/images.unsplash.com\/photo-1573165706511-3ffde6ef1fe3?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxM3x8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY3MjkyMDQ4OQ&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=6016&amp;h=4016&amp;fit=max\" alt=\"three women sitting beside wooden table\" srcSet=\"https:\/\/images.unsplash.com\/photo-1573165706511-3ffde6ef1fe3?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxM3x8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY3MjkyMDQ4OQ&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=6016&amp;h=4016&amp;fit=max 6016w,https:\/\/images.unsplash.com\/photo-1573165706511-3ffde6ef1fe3?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxM3x8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY3MjkyMDQ4OQ&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=4812&amp;h=3212&amp;fit=max 4812w,https:\/\/images.unsplash.com\/photo-1573165706511-3ffde6ef1fe3?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxM3x8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY3MjkyMDQ4OQ&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=3609&amp;h=2409&amp;fit=max 3609w,https:\/\/images.unsplash.com\/photo-1573165706511-3ffde6ef1fe3?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxM3x8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY3MjkyMDQ4OQ&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=2406&amp;h=1606&amp;fit=max 2406w,https:\/\/images.unsplash.com\/photo-1573165706511-3ffde6ef1fe3?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxM3x8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY3MjkyMDQ4OQ&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=1203&amp;h=803&amp;fit=max 1203w,https:\/\/images.unsplash.com\/photo-1573165706511-3ffde6ef1fe3?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxM3x8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY3MjkyMDQ4OQ&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>\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;top:-6.31068%;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-2ad5ac42-0aab-4934-a886-dd828e311d1a\">\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:8.73786%;top:35.11327%;width:85.43689%;height:29.77346%;opacity:1\">\n<div id=\"anim-f2c64fcc-23ac-423f-bcce-8b6515ba82a0\" 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-31ce9bf7-975d-4b04-95c2-0da4b9f42d44\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0;--initial-opacity:1;--initial-transform:scale(0.3333333333333333)\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0;border-radius:0.5681818181818182% 0.5681818181818182% 0.5681818181818182% 0.5681818181818182% \/ 1.0869565217391304% 1.0869565217391304% 1.0869565217391304% 1.0869565217391304%\" id=\"el-10752c12-70a7-4a16-8ef9-0e5287245dc9\">\n<h2 id=\"the-recursive-strategy-involves-repeatedly-comparing-characters-of-both-sequences-and-maximize-the-match-if-they-are-identical\" class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:0.6647727272727272% 0;font-family:&quot;Darker Grotesque&quot;,sans-serif;font-size:0.485437em;line-height:1.2;text-align:left;padding:0;color:#000000\"><span><span style=\"color: #fff\">The recursive strategy involves repeatedly comparing characters of both sequences, and maximize the match if they are identical.<\/span><\/span><\/h2>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div style=\"position:absolute;pointer-events:none;left:0;top:4.69256%;width:99.51456%;height:11.48867%;opacity:1\">\n<div id=\"anim-7eb19caf-6ce2-4262-ba59-adc0b9768157\" 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-a325329f-10ca-4e4f-823d-b4bbedabd3d6\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0;--initial-opacity:1;--initial-transform:scale(0.3333333333333333)\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0;border-radius:0.4878048780487805% 0.4878048780487805% 0.4878048780487805% 0.4878048780487805% \/ 2.8169014084507045% 2.8169014084507045% 2.8169014084507045% 2.8169014084507045%;background-clip:content-box;background-color:#052258\" id=\"el-57873e8b-55df-446d-96f9-0af9e4ce24c7\">\n<h1 id=\"recursive-approach\" class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:2.613658536585366% 0;font-family:&quot;Darker Grotesque&quot;,sans-serif;font-size:0.760518em;line-height:0.9;text-align:center;padding:0.975609756097561% 1.951219512195122%;color:#000000\"><span><span style=\"font-weight: 700; color: #3372e0\">Recursive Approach<\/span><\/span><\/h1>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p><\/amp-story-grid-layer><amp-story-page-outlink layout=\"nodisplay\" cta-image=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/10\/Longest-Common-Substring.jpg\"><a href=\"https:\/\/www.interviewbit.com\/blog\/longest-common-substring\/?utm_source=Ib&amp;utm_medium=webstories&amp;utm_campaign=longest-common-substring\" rel=\"\">Checkout its algorithm<\/a><\/amp-story-page-outlink><\/amp-story-page><amp-story-page id=\"015ce16c-01eb-4503-a5fd-c69fd2ace5d2\" auto-advance-after=\"7s\"><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-3c47cbaa-d9bf-4966-91e3-953c5122efae\",\"keyframes\":{\"opacity\":[0,1]},\"delay\":0,\"duration\":2000,\"easing\":\"cubic-bezier(.3,0,.55,1)\",\"fill\":\"both\"}]<\/script><\/amp-story-animation><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-3a61fae3-8c6e-4c15-bb83-26b2088f2b94\",\"keyframes\":{\"transform\":[\"scale(0.3333333333333333)\",\"scale(1)\"]},\"delay\":0,\"duration\":2000,\"easing\":\"cubic-bezier(.3,0,.55,1)\",\"fill\":\"forwards\"}]<\/script><\/amp-story-animation><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-251afdd8-573c-47a6-92a0-1447c2e4663c [data-leaf-element=\\\"true\\\"]\",\"keyframes\":{\"transform\":[\"translate(0%, 0%) scale(1.5)\",\"translate(0%, 0%) scale(1)\"]},\"delay\":0,\"duration\":2000,\"easing\":\"cubic-bezier(.3,0,.55,1)\",\"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:#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-251afdd8-573c-47a6-92a0-1447c2e4663c\" 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-07cb1230-628a-4b45-910c-b13bf7f662ea\">\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=MnwxMzcxOTN8MHwxfHNlYXJjaHw0NHx8amF2YSUyMGRldmVsb3BlcnxlbnwwfHx8fDE2NzMwMDg0NzY&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=MnwxMzcxOTN8MHwxfHNlYXJjaHw0NHx8amF2YSUyMGRldmVsb3BlcnxlbnwwfHx8fDE2NzMwMDg0NzY&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=MnwxMzcxOTN8MHwxfHNlYXJjaHw0NHx8amF2YSUyMGRldmVsb3BlcnxlbnwwfHx8fDE2NzMwMDg0NzY&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=MnwxMzcxOTN8MHwxfHNlYXJjaHw0NHx8amF2YSUyMGRldmVsb3BlcnxlbnwwfHx8fDE2NzMwMDg0NzY&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=MnwxMzcxOTN8MHwxfHNlYXJjaHw0NHx8amF2YSUyMGRldmVsb3BlcnxlbnwwfHx8fDE2NzMwMDg0NzY&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=MnwxMzcxOTN8MHwxfHNlYXJjaHw0NHx8amF2YSUyMGRldmVsb3BlcnxlbnwwfHx8fDE2NzMwMDg0NzY&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=MnwxMzcxOTN8MHwxfHNlYXJjaHw0NHx8amF2YSUyMGRldmVsb3BlcnxlbnwwfHx8fDE2NzMwMDg0NzY&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:0;top:-6.31068%;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-ddd85b20-5151-46db-b5aa-6c37b1273284\">\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.28155%;top:36.40777%;width:85.43689%;height:35.76052%;opacity:1\">\n<div id=\"anim-3c47cbaa-d9bf-4966-91e3-953c5122efae\" 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-3a61fae3-8c6e-4c15-bb83-26b2088f2b94\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0;--initial-opacity:1;--initial-transform:scale(0.3333333333333333)\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0;border-radius:0.5681818181818182% 0.5681818181818182% 0.5681818181818182% 0.5681818181818182% \/ 0.904977375565611% 0.904977375565611% 0.904977375565611% 0.904977375565611%\" id=\"el-5a80f896-83ce-48d0-b555-413c716f09c1\">\n<h2 id=\"time-complexity-o3-nm-where-n-and-m-are-lengths-of-sequences-space-complexity-omaxn-m\" class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:0.6647727272727272% 0;font-family:&quot;Darker Grotesque&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: #347eff\">Time complexity: <\/span><span style=\"color: #fff\">O(3 ^(n*m)), where n and m are lengths of sequences.&nbsp;<\/span><\/p>\n<p><span style=\"font-weight: 700; color: #347eff\">Space complexity:<\/span><span style=\"color: #347eff\"> <\/span><span style=\"color: #fff\">O(max(n, m))<\/span><\/span><\/h2>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p><\/amp-story-grid-layer><amp-story-page-outlink layout=\"nodisplay\" cta-image=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/10\/Longest-Common-Substring.jpg\"><a href=\"https:\/\/www.interviewbit.com\/blog\/longest-common-substring\/?utm_source=Ib&amp;utm_medium=webstories&amp;utm_campaign=longest-common-substring\" rel=\"\">See code implementation<\/a><\/amp-story-page-outlink><\/amp-story-page><amp-story-page id=\"8df77031-9e15-4779-a2a9-fe68c9e86633\" auto-advance-after=\"7s\"><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-f25292b6-35a7-45a5-9a4e-8ba56242dca3\",\"keyframes\":{\"opacity\":[0,1]},\"delay\":0,\"duration\":2000,\"easing\":\"cubic-bezier(.3,0,.55,1)\",\"fill\":\"both\"}]<\/script><\/amp-story-animation><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-68e7f874-7c5b-4dac-9dfc-64a190cba695\",\"keyframes\":{\"transform\":[\"scale(0.3333333333333333)\",\"scale(1)\"]},\"delay\":0,\"duration\":2000,\"easing\":\"cubic-bezier(.3,0,.55,1)\",\"fill\":\"forwards\"}]<\/script><\/amp-story-animation><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-26dfe584-e271-40a9-a523-cfecf1a1e668 [data-leaf-element=\\\"true\\\"]\",\"keyframes\":{\"transform\":[\"translate(0%, 0%) scale(1.5)\",\"translate(0%, 0%) scale(1)\"]},\"delay\":0,\"duration\":2000,\"easing\":\"cubic-bezier(.3,0,.55,1)\",\"fill\":\"forwards\"}]<\/script><\/amp-story-animation><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-a2686caf-1c23-4742-9abc-0e6025a37761\",\"keyframes\":{\"opacity\":[0,1]},\"delay\":0,\"duration\":2000,\"easing\":\"cubic-bezier(.3,0,.55,1)\",\"fill\":\"both\"}]<\/script><\/amp-story-animation><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-17a419b2-e6a5-40f6-b6e8-8a58d0a7bfc8\",\"keyframes\":{\"transform\":[\"scale(0.3333333333333333)\",\"scale(1)\"]},\"delay\":0,\"duration\":2000,\"easing\":\"cubic-bezier(.3,0,.55,1)\",\"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-26dfe584-e271-40a9-a523-cfecf1a1e668\" 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-abc994fd-18e5-4821-9439-6a805f711046\">\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-1573495627094-cbfef909a47b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw4MHx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjczNDQzODM1&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=4016&amp;h=6016&amp;fit=max\" alt=\"shallow focus photo of woman using gray laptop computer\" srcSet=\"https:\/\/images.unsplash.com\/photo-1573495627094-cbfef909a47b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw4MHx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjczNDQzODM1&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=4016&amp;h=6016&amp;fit=max 4016w,https:\/\/images.unsplash.com\/photo-1573495627094-cbfef909a47b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw4MHx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjczNDQzODM1&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=3212&amp;h=4812&amp;fit=max 3212w,https:\/\/images.unsplash.com\/photo-1573495627094-cbfef909a47b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw4MHx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjczNDQzODM1&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=2409&amp;h=3609&amp;fit=max 2409w,https:\/\/images.unsplash.com\/photo-1573495627094-cbfef909a47b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw4MHx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjczNDQzODM1&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=1606&amp;h=2406&amp;fit=max 1606w,https:\/\/images.unsplash.com\/photo-1573495627094-cbfef909a47b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw4MHx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjczNDQzODM1&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=803&amp;h=1203&amp;fit=max 803w,https:\/\/images.unsplash.com\/photo-1573495627094-cbfef909a47b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw4MHx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjczNDQzODM1&amp;ixlib=rb-4.0.3&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:0;top:-6.31068%;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-0a76cce9-5584-441b-bdfc-8adb40d0cc18\">\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.28155%;top:41.58576%;width:85.43689%;height:35.76052%;opacity:1\">\n<div id=\"anim-f25292b6-35a7-45a5-9a4e-8ba56242dca3\" 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-68e7f874-7c5b-4dac-9dfc-64a190cba695\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0;--initial-opacity:1;--initial-transform:scale(0.3333333333333333)\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0;border-radius:0.5681818181818182% 0.5681818181818182% 0.5681818181818182% 0.5681818181818182% \/ 0.904977375565611% 0.904977375565611% 0.904977375565611% 0.904977375565611%\" id=\"el-68dc11dc-e204-44c0-b174-4c7e4f8d8ead\">\n<h2 id=\"the-optimal-approach-is-to-employ-dynamic-programming-of-storing-sub-problems-this-entails-determining-the-longest-common-suffix-for-all-sub-strings-in-both-sequences\" class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:0.6647727272727272% 0;font-family:&quot;Darker Grotesque&quot;,sans-serif;font-size:0.485437em;line-height:1.2;text-align:left;padding:0;color:#000000\"><span><span style=\"color: #fff\">The optimal approach is to employ dynamic programming of storing sub-problems. This entails determining the longest common suffix for all sub-strings in both sequences.<\/span><\/span><\/h2>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div style=\"position:absolute;pointer-events:none;left:0;top:4.69256%;width:99.51456%;height:25.24272%;opacity:1\">\n<div id=\"anim-a2686caf-1c23-4742-9abc-0e6025a37761\" 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-17a419b2-e6a5-40f6-b6e8-8a58d0a7bfc8\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0;--initial-opacity:1;--initial-transform:scale(0.3333333333333333)\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0;border-radius:0.4878048780487805% 0.4878048780487805% 0.4878048780487805% 0.4878048780487805% \/ 1.282051282051282% 1.282051282051282% 1.282051282051282% 1.282051282051282%;background-clip:content-box;background-color:#052258\" id=\"el-c443c2c6-2783-4348-9cb4-4ac952ad3b88\">\n<h1 id=\"dynamic-programming-approach\" class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:2.613658536585366% 0;font-family:&quot;Darker Grotesque&quot;,sans-serif;font-size:0.760518em;line-height:0.9;text-align:center;padding:0.975609756097561% 1.951219512195122%;color:#000000\"><span><span style=\"font-weight: 700; color: #3372e0\">Dynamic Programming Approach<\/span><\/span><\/h1>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p><\/amp-story-grid-layer><amp-story-page-outlink layout=\"nodisplay\" cta-image=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/10\/Longest-Common-Substring.jpg\"><a href=\"https:\/\/www.interviewbit.com\/blog\/longest-common-substring\/?utm_source=Ib&amp;utm_medium=webstories&amp;utm_campaign=longest-common-substring\" rel=\"\">Checkout its algorithm<\/a><\/amp-story-page-outlink><\/amp-story-page><amp-story-page id=\"9cf6163f-6d49-4cd9-b20d-820dab8f09f4\" auto-advance-after=\"7s\"><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-96c8d2a6-18cd-4e1a-ae1f-70245034aa6c\",\"keyframes\":{\"opacity\":[0,1]},\"delay\":0,\"duration\":2000,\"easing\":\"cubic-bezier(.3,0,.55,1)\",\"fill\":\"both\"}]<\/script><\/amp-story-animation><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-2bda6342-1ed1-42b2-87ed-5099d5db3336\",\"keyframes\":{\"transform\":[\"scale(0.3333333333333333)\",\"scale(1)\"]},\"delay\":0,\"duration\":2000,\"easing\":\"cubic-bezier(.3,0,.55,1)\",\"fill\":\"forwards\"}]<\/script><\/amp-story-animation><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-baa87ef8-e2ce-4e6b-a74e-9fcefd12501b [data-leaf-element=\\\"true\\\"]\",\"keyframes\":{\"transform\":[\"translate(0%, 0%) scale(1.5)\",\"translate(0%, 0%) scale(1)\"]},\"delay\":0,\"duration\":2000,\"easing\":\"cubic-bezier(.3,0,.55,1)\",\"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:#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 id=\"anim-baa87ef8-e2ce-4e6b-a74e-9fcefd12501b\" 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-1a4302e2-14d2-4e1b-a167-83e3c20cc912\">\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-1631624210938-539575f92e3c?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwyNHx8c29mdHdhcmUlMjBkZXZlbG9wbWVudHxlbnwwfHx8fDE2NjYwMDQwNzM&amp;ixlib=rb-1.2.1&amp;fm=jpg&amp;w=4000&amp;h=6000&amp;fit=max\" alt=\"media\/unsplash:7wLQNYKL3Rw\" srcSet=\"https:\/\/images.unsplash.com\/photo-1631624210938-539575f92e3c?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwyNHx8c29mdHdhcmUlMjBkZXZlbG9wbWVudHxlbnwwfHx8fDE2NjYwMDQwNzM&amp;ixlib=rb-1.2.1&amp;fm=jpg&amp;w=4000&amp;h=6000&amp;fit=max 4000w,https:\/\/images.unsplash.com\/photo-1631624210938-539575f92e3c?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwyNHx8c29mdHdhcmUlMjBkZXZlbG9wbWVudHxlbnwwfHx8fDE2NjYwMDQwNzM&amp;ixlib=rb-1.2.1&amp;fm=jpg&amp;w=3200&amp;h=4800&amp;fit=max 3200w,https:\/\/images.unsplash.com\/photo-1631624210938-539575f92e3c?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwyNHx8c29mdHdhcmUlMjBkZXZlbG9wbWVudHxlbnwwfHx8fDE2NjYwMDQwNzM&amp;ixlib=rb-1.2.1&amp;fm=jpg&amp;w=2400&amp;h=3600&amp;fit=max 2400w,https:\/\/images.unsplash.com\/photo-1631624210938-539575f92e3c?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwyNHx8c29mdHdhcmUlMjBkZXZlbG9wbWVudHxlbnwwfHx8fDE2NjYwMDQwNzM&amp;ixlib=rb-1.2.1&amp;fm=jpg&amp;w=1600&amp;h=2400&amp;fit=max 1600w,https:\/\/images.unsplash.com\/photo-1631624210938-539575f92e3c?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwyNHx8c29mdHdhcmUlMjBkZXZlbG9wbWVudHxlbnwwfHx8fDE2NjYwMDQwNzM&amp;ixlib=rb-1.2.1&amp;fm=jpg&amp;w=800&amp;h=1200&amp;fit=max 800w,https:\/\/images.unsplash.com\/photo-1631624210938-539575f92e3c?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwyNHx8c29mdHdhcmUlMjBkZXZlbG9wbWVudHxlbnwwfHx8fDE2NjYwMDQwNzM&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:0;top:-6.31068%;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-714d4b27-56b9-4059-86b7-f96b9aebf636\">\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.28155%;top:41.58576%;width:85.43689%;height:29.77346%;opacity:1\">\n<div id=\"anim-96c8d2a6-18cd-4e1a-ae1f-70245034aa6c\" 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-2bda6342-1ed1-42b2-87ed-5099d5db3336\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0;--initial-opacity:1;--initial-transform:scale(0.3333333333333333)\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0;border-radius:0.5681818181818182% 0.5681818181818182% 0.5681818181818182% 0.5681818181818182% \/ 1.0869565217391304% 1.0869565217391304% 1.0869565217391304% 1.0869565217391304%\" id=\"el-9e7f24fa-f710-4cd5-96c0-5fca546c5906\">\n<h2 id=\"time-complexity-onm-where-n-and-m-are-the-lengths-of-sequences-space-complexity-onm\" class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:0.6647727272727272% 0;font-family:&quot;Darker Grotesque&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: #347eff\">Time complexity: <\/span><span style=\"color: #fff\">O(n*m), where n and m are the lengths of sequences.&nbsp;<\/span><\/p>\n<p><span style=\"font-weight: 700; color: #347eff\">Space complexity:<\/span><span style=\"color: #fff\"> O(n*m)<\/span><\/span><\/h2>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p><\/amp-story-grid-layer><amp-story-page-outlink layout=\"nodisplay\" cta-image=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/10\/Longest-Common-Substring.jpg\"><a href=\"https:\/\/www.interviewbit.com\/blog\/longest-common-substring\/?utm_source=Ib&amp;utm_medium=webstories&amp;utm_campaign=longest-common-substring\" rel=\"\">See code implementation<\/a><\/amp-story-page-outlink><\/amp-story-page><amp-story-page id=\"936b559d-4dc0-423a-9d89-b4d4ba99b081\" auto-advance-after=\"7s\"><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-0602cf05-b7c4-47d3-bb23-b1b2a4266a92\",\"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-419fea51-5010-4575-9206-e402abcc9554\",\"keyframes\":{\"transform\":[\"translate3d(-112.4161%, 0px, 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-41d276c7-f0ac-4c77-9c26-20fde4184dbd\",\"keyframes\":{\"opacity\":[0,1]},\"delay\":0,\"duration\":2000,\"easing\":\"cubic-bezier(.3,0,.55,1)\",\"fill\":\"both\"}]<\/script><\/amp-story-animation><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-85b7bcfe-8665-4829-b39b-f3e222473624\",\"keyframes\":{\"transform\":[\"scale(0.3333333333333333)\",\"scale(1)\"]},\"delay\":0,\"duration\":2000,\"easing\":\"cubic-bezier(.3,0,.55,1)\",\"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 style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0\" class=\"mask\" id=\"el-07cb1230-628a-4b45-910c-b13bf7f662ea\">\n<div style=\"position:absolute;width:267.16887%;height:100%;left:-83.58443%;top:0%\" data-leaf-element=\"true\"><amp-img layout=\"fill\" src=\"https:\/\/images.unsplash.com\/photo-1451187580459-43490279c0fa?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxiaWclMjBkYXRhfGVufDB8fHx8MTY3MjY2MDQyNA&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=4256&amp;h=2832&amp;fit=max\" alt=\"photo of outer space\" srcSet=\"https:\/\/images.unsplash.com\/photo-1451187580459-43490279c0fa?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxiaWclMjBkYXRhfGVufDB8fHx8MTY3MjY2MDQyNA&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=4256&amp;h=2832&amp;fit=max 4256w,https:\/\/images.unsplash.com\/photo-1451187580459-43490279c0fa?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxiaWclMjBkYXRhfGVufDB8fHx8MTY3MjY2MDQyNA&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=3404&amp;h=2265&amp;fit=max 3404w,https:\/\/images.unsplash.com\/photo-1451187580459-43490279c0fa?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxiaWclMjBkYXRhfGVufDB8fHx8MTY3MjY2MDQyNA&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=2553&amp;h=1699&amp;fit=max 2553w,https:\/\/images.unsplash.com\/photo-1451187580459-43490279c0fa?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxiaWclMjBkYXRhfGVufDB8fHx8MTY3MjY2MDQyNA&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=1702&amp;h=1133&amp;fit=max 1702w,https:\/\/images.unsplash.com\/photo-1451187580459-43490279c0fa?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxiaWclMjBkYXRhfGVufDB8fHx8MTY3MjY2MDQyNA&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=851&amp;h=566&amp;fit=max 851w,https:\/\/images.unsplash.com\/photo-1451187580459-43490279c0fa?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxiaWclMjBkYXRhfGVufDB8fHx8MTY3MjY2MDQyNA&amp;ixlib=rb-4.0.3&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-color:rgba(0,0,0,0.4)\"><\/div>\n<\/div>\n<\/div>\n<div class=\"page-background-overlay-area\" style=\"background-color:rgba(0,0,0,0.4)\"><\/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;top:-6.31068%;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-380e77ec-becc-4e13-b03c-a3c1bed377c3\">\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:8.98058%;top:39.15858%;width:72.3301%;height:38.83495%;opacity:1\">\n<div id=\"anim-0602cf05-b7c4-47d3-bb23-b1b2a4266a92\" 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-419fea51-5010-4575-9206-e402abcc9554\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0;--initial-opacity:1;--initial-transform:translate3d(-112.4161%, 0px, 0)\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0\" id=\"el-3842812c-d804-48f9-b479-cbae6e5ee4fe\">\n<h2 id=\"want-to-explore-these-approaches-and-learn-how-to-implement-them-in-various-programming-languages\" class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:1.6395763422818794% 0;font-family:&quot;Anton&quot;,sans-serif;font-size:0.517799em;line-height:1.2;text-align:left;padding:0;color:#000000\"><span><span style=\"color: #faf4ea\">Want to explore these approaches and learn how to implement them in various programming languages?<\/span><\/span><\/h2>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div style=\"position:absolute;pointer-events:none;left:8.00971%;top:77.6699%;width:85.43689%;height:11.97411%;opacity:1\">\n<div id=\"anim-41d276c7-f0ac-4c77-9c26-20fde4184dbd\" 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-85b7bcfe-8665-4829-b39b-f3e222473624\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0;--initial-opacity:1;--initial-transform:scale(0.3333333333333333)\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0;border-radius:0.5681818181818182% 0.5681818181818182% 0.5681818181818182% 0.5681818181818182% \/ 2.7027027027027026% 2.7027027027027026% 2.7027027027027026% 2.7027027027027026%\" id=\"el-faf98ac9-3bde-42ce-ba57-b4ed553c9aaf\">\n<h2 id=\"click-on-the-link-below-to-start-your-journey\" class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:1.0909090909090908% 0;font-family:&quot;Darker Grotesque&quot;,sans-serif;font-size:0.485437em;line-height:1.1;text-align:left;padding:0;color:#000000\"><span><span style=\"font-weight: 700; color: #347eff\">Click on the link below to start your journey.<\/span><\/span><\/h2>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p><\/amp-story-grid-layer><amp-story-page-outlink layout=\"nodisplay\" cta-image=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/10\/Longest-Common-Substring.jpg\"><a href=\"https:\/\/www.interviewbit.com\/blog\/longest-common-substring\/?utm_source=Ib&amp;utm_medium=webstories&amp;utm_campaign=longest-common-substring\" rel=\"\">SWIPE UP<\/a><\/amp-story-page-outlink><\/amp-story-page><\/amp-story><\/body><\/html><\/p>\n","protected":false},"excerpt":{"rendered":"In this web story, we will show you how to find longest common substring. Also, how to implement this in different programming languages.\n","protected":false},"author":21,"featured_media":15748,"template":"","meta":{"_daextam_enable_autolinks":"","web_stories_products":[],"web_stories_publisher_logo":1082,"web_stories_poster":[]},"web_story_category":[1944],"web_story_tag":[2285],"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":247,"mask":{"type":"rectangle"},"isBackground":true,"type":"image","id":"8713361c-f03a-487f-9a51-a0f98b9ddadb","scale":100,"focalX":50,"focalY":50,"resource":{"baseColor":"#0c2640","blurHash":"L32F_aR4MItmROkCt8WAMHo#tmVs","type":"image","mimeType":"image\/jpeg","creationDate":"2018-04-17T10:34:35Z","src":"https:\/\/images.unsplash.com\/photo-1523961131990-5ea7c61b2107?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxfHxiaWclMjBkYXRhfGVufDB8fHx8MTY3MjY2MDQyNA&ixlib=rb-4.0.3&fm=jpg&w=2048&h=1536&fit=max","width":2048,"height":1536,"id":"media\/unsplash:oyXis2kALVg","alt":"geometric shape digital wallpaper","sizes":{"full":{"file":"media\/unsplash:oyXis2kALVg","sourceUrl":"https:\/\/images.unsplash.com\/photo-1523961131990-5ea7c61b2107?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxfHxiaWclMjBkYXRhfGVufDB8fHx8MTY3MjY2MDQyNA&ixlib=rb-4.0.3&fm=jpg&w=2048&h=1536&fit=max","mimeType":"image\/jpeg","width":2048,"height":1536},"large":{"file":"media\/unsplash:oyXis2kALVg","sourceUrl":"https:\/\/images.unsplash.com\/photo-1523961131990-5ea7c61b2107?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxfHxiaWclMjBkYXRhfGVufDB8fHx8MTY3MjY2MDQyNA&ixlib=rb-4.0.3&fm=jpg&w=1638&h=1229&fit=max","mimeType":"image\/jpeg","width":1638,"height":1229},"1228_921":{"file":"media\/unsplash:oyXis2kALVg","sourceUrl":"https:\/\/images.unsplash.com\/photo-1523961131990-5ea7c61b2107?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxfHxiaWclMjBkYXRhfGVufDB8fHx8MTY3MjY2MDQyNA&ixlib=rb-4.0.3&fm=jpg&w=1228&h=921&fit=max","mimeType":"image\/jpeg","width":1228,"height":921},"819_614":{"file":"media\/unsplash:oyXis2kALVg","sourceUrl":"https:\/\/images.unsplash.com\/photo-1523961131990-5ea7c61b2107?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxfHxiaWclMjBkYXRhfGVufDB8fHx8MTY3MjY2MDQyNA&ixlib=rb-4.0.3&fm=jpg&w=819&h=614&fit=max","mimeType":"image\/jpeg","width":819,"height":614},"409_307":{"file":"media\/unsplash:oyXis2kALVg","sourceUrl":"https:\/\/images.unsplash.com\/photo-1523961131990-5ea7c61b2107?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxfHxiaWclMjBkYXRhfGVufDB8fHx8MTY3MjY2MDQyNA&ixlib=rb-4.0.3&fm=jpg&w=409&h=307&fit=max","mimeType":"image\/jpeg","width":409,"height":307},"web_stories_thumbnail":{"file":"media\/unsplash:oyXis2kALVg","sourceUrl":"https:\/\/images.unsplash.com\/photo-1523961131990-5ea7c61b2107?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxfHxiaWclMjBkYXRhfGVufDB8fHx8MTY3MjY2MDQyNA&ixlib=rb-4.0.3&fm=jpg&w=340&h=255&fit=max","mimeType":"image\/jpeg","width":340,"height":255}},"attribution":{"author":{"displayName":"fabio","url":"https:\/\/unsplash.com\/@fabioha?utm_source=web_stories_wordpress&utm_medium=referral"},"registerUsageUrl":"https:\/\/media3p.googleapis.com\/v1\/media:registerUsage?token=AXhJFEce%2BzWZmFhsx%2BwKiMk\/TFXpJ1tVoa1hIN%2BDsa2yY1QPy7IzOuDP0Lpq%2BWC4PfcYVTdKXcdjn3e8QHkxqHyYukjVlhRB%2Bb0XtSZ\/l9REc3wmE8jmw6MHTFZpVDZ2UBowVcJzY3c8UkrIYQ6IXxjYGK5G3BMTfOea2Vx2h5lDFGHp7WHpCvFFad5PzzFm2ysgK0srrUclNhvCpb7QbkLG4rJJzeneTzBvjfuqUcMyVE4K6hc%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":0,"y":-39,"width":180,"height":60,"mask":{"type":"rectangle"},"basedOn":"bcb61e91-e319-4af6-9942-761a6dccae4d","id":"96332792-fe49-4105-a90e-4f4a9d61ad55","type":"image"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"NONE","font":{"family":"Roboto"},"fontSize":50,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":1,"textAlign":"left","padding":{"locked":true,"hasHiddenPadding":false,"horizontal":0,"vertical":0},"content":"<span style=\"font-weight: 700; color: #fff\">How to find Longest Common Substring?<\/span>","borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"x":22,"y":282,"width":316,"height":209,"basedOn":"d3a60bc4-7153-47e4-b0a7-e025488ebee6","id":"95a17566-0eff-4d0a-a9a1-c1eab9f25976","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},"content":"<span style=\"color: #347eff\">Let's dive in!<\/span>","borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"x":23,"y":501,"width":376,"height":35,"basedOn":"e5b0ef4a-2875-4ea0-b76a-2e4842af3a52","id":"cd5e9604-8a06-49c9-ac81-19784a284f87","type":"text"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":false,"scale":100,"focalX":50,"focalY":50,"resource":{"baseColor":"#c9c9c9","type":"image","mimeType":"image\/gif","creationDate":"2021-06-15T20:48:37Z","src":"https:\/\/media.tenor.com\/8uSPaXIUm7UAAAAi\/arrow.gif","width":127,"height":96,"id":"media\/tenor:17502271734916881333","alt":"Arrow Sticker","sizes":{"full":{"file":"media\/tenor:17502271734916881333","sourceUrl":"https:\/\/media.tenor.com\/8uSPaXIUm7UAAAAi\/arrow.gif","mimeType":"image\/gif","width":127,"height":96},"large":{"file":"media\/tenor:17502271734916881333","sourceUrl":"https:\/\/c.tenor.com\/8uSPaXIUm7UAAAAq\/tenor.gif","mimeType":"image\/gif","width":127,"height":96},"127_96":{"file":"media\/tenor:17502271734916881333","sourceUrl":"https:\/\/media.tenor.com\/8uSPaXIUm7UAAAAj\/arrow.gif","mimeType":"image\/gif","width":127,"height":96},"web_stories_thumbnail":{"file":"media\/tenor:17502271734916881333","sourceUrl":"https:\/\/media.tenor.com\/8uSPaXIUm7UAAAAk\/arrow.gif","mimeType":"image\/gif","width":90,"height":68}},"attribution":{"author":{"displayName":"BaqueG","url":"https:\/\/tenor.com\/users\/BaqueG"},"registerUsageUrl":"https:\/\/media3p.googleapis.com\/v1\/media:registerUsage?token=AWJwhCGn%2BblUDo95R408YCZKIfyn7yyguspEYe\/\/fKJgzBIWZN0ChVCN8Rsn9SkHv8fUjZj07Pze7bYjLhpJnosB5yKEcbo%3D"},"isPlaceholder":false,"isOptimized":false,"isMuted":false,"isExternal":true,"needsProxy":false},"x":16,"y":561,"width":149,"height":88,"mask":{"type":"rectangle","showInLibrary":true,"name":"Rectangle","path":"M 0,0 1,0 1,1 0,1 0,0 Z","ratio":1,"supportsBorder":true},"basedOn":"3f59b2d3-ad4a-43b4-af04-92e0f580c1f9","id":"1635eb8e-c97a-4bdf-98ea-5a430567b7fd","type":"image"}],"backgroundColor":{"color":{"r":255,"g":255,"b":255}},"id":"d1e9a7c2-404d-415a-a2eb-eea40554940b","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":"0261f38d-d8bd-4b47-9896-610bb81df005"},"animations":[]},{"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":"76638dd5-e923-4c37-8934-99f03447a159","scale":100,"focalX":50,"focalY":50,"resource":{"baseColor":"#262626","blurHash":"LFAmC_58$%I:~VE2t8W?WrflIo%1","type":"image","mimeType":"image\/jpeg","creationDate":"2019-11-07T22:13:50Z","src":"https:\/\/images.unsplash.com\/photo-1573164713712-03790a178651?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzNXx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY2NjM2MDY5Ng&ixlib=rb-4.0.3&fm=jpg&w=6016&h=4016&fit=max","width":6016,"height":4016,"id":"media\/unsplash:L85a1k-XqH8","alt":"woman in black shirt using laptop computer","sizes":{"full":{"file":"media\/unsplash:L85a1k-XqH8","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573164713712-03790a178651?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzNXx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY2NjM2MDY5Ng&ixlib=rb-4.0.3&fm=jpg&w=6016&h=4016&fit=max","mimeType":"image\/jpeg","width":6016,"height":4016},"large":{"file":"media\/unsplash:L85a1k-XqH8","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573164713712-03790a178651?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzNXx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY2NjM2MDY5Ng&ixlib=rb-4.0.3&fm=jpg&w=4812&h=3212&fit=max","mimeType":"image\/jpeg","width":4812,"height":3212},"3609_2409":{"file":"media\/unsplash:L85a1k-XqH8","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573164713712-03790a178651?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzNXx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY2NjM2MDY5Ng&ixlib=rb-4.0.3&fm=jpg&w=3609&h=2409&fit=max","mimeType":"image\/jpeg","width":3609,"height":2409},"2406_1606":{"file":"media\/unsplash:L85a1k-XqH8","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573164713712-03790a178651?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzNXx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY2NjM2MDY5Ng&ixlib=rb-4.0.3&fm=jpg&w=2406&h=1606&fit=max","mimeType":"image\/jpeg","width":2406,"height":1606},"1203_803":{"file":"media\/unsplash:L85a1k-XqH8","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573164713712-03790a178651?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzNXx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY2NjM2MDY5Ng&ixlib=rb-4.0.3&fm=jpg&w=1203&h=803&fit=max","mimeType":"image\/jpeg","width":1203,"height":803},"web_stories_thumbnail":{"file":"media\/unsplash:L85a1k-XqH8","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573164713712-03790a178651?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzNXx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY2NjM2MDY5Ng&ixlib=rb-4.0.3&fm=jpg&w=340&h=227&fit=max","mimeType":"image\/jpeg","width":340,"height":227}},"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=AQBR4tpUK7LmuVs8hywyG7ZNT\/IANFQMT5EQVFmKXUhmFGJLcYOybJyAHjY5cN7LFcg7\/au35WOJNwQa8eFQErZFjDPC09pKVbcd7nFwi4Dne6aJ\/agIcZvksCWUxhFQRuXH8Lqv89gRqDmAwh1d0MLN\/9e6EOXZ\/1n4ZlYPaSWSIHgSXZJvPnoi8FQcrOShyJqInuAHqCREV07vTahGggYgiw\/MG1Clw7Kbb%2BGCxpQYdAzcxRorXs5\/MGm4\/d5uHS8vkKrc"},"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":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":0,"y":-39,"width":180,"height":60,"mask":{"type":"rectangle"},"basedOn":"61b32cde-1c85-4a55-adbb-d0e5621c0185","id":"a3bb84b5-e208-4e2a-936f-5611c92d7d16","type":"image"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"NONE","font":{"family":"Darker Grotesque"},"fontSize":30,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":1.2,"textAlign":"left","padding":{"locked":true,"hasHiddenPadding":false,"horizontal":null,"vertical":null},"content":"<span style=\"color: #fff\">Given two strings, the task is to find longest common substring, in same order, present in given strings. Remember that a substring is a sequence of characters that appears consecutively within a string.<\/span>","borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"width":352,"height":256,"basedOn":"f97fd49e-97ee-4616-af20-f3080ddf1fb7","x":32,"y":213,"groupId":null,"id":"01463911-9ace-441d-a6f8-4307552a5552","type":"text"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"FILL","font":{"family":"Darker Grotesque"},"fontSize":47,"backgroundColor":{"color":{"r":5,"g":34,"b":88}},"lineHeight":0.9,"textAlign":"center","padding":{"locked":true,"hasHiddenPadding":true,"horizontal":8,"vertical":4},"content":"<span style=\"font-weight: 700; color: #3372e0\">Problem Statement<\/span>","borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"x":0,"y":29,"width":410,"height":72,"marginOffset":-33.45600000000001,"basedOn":"7f5143b8-6b83-4d67-8600-c66ffe9d9e4d","groupId":null,"id":"bf868b6a-256e-480a-bfe1-970aef991286","type":"text"}],"backgroundColor":{"color":{"r":255,"g":255,"b":255}},"animations":[{"id":"c31d02c8-b413-4318-a5d0-16b804300858","type":"effect-zoom","scaleDirection":"scaleIn","duration":2000,"delay":0,"targets":["01463911-9ace-441d-a6f8-4307552a5552"]},{"id":"9378c669-de46-4b31-8918-7ba002c39f3e","type":"effect-background-zoom","zoomDirection":"scaleOut","duration":2000,"delay":0,"targets":["76638dd5-e923-4c37-8934-99f03447a159"]},{"targets":["bf868b6a-256e-480a-bfe1-970aef991286"],"id":"52bdfda1-4c85-4c3f-9bf7-0eecb013e063","type":"effect-zoom","scaleDirection":"scaleIn","duration":2000,"delay":0}],"id":"ae40903e-5d0a-4461-bb14-d9db3bfd6b21","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":"01a3f12e-8e51-4c1f-a11e-a008881031f6"},"pageAttachment":{"url":"https:\/\/www.interviewbit.com\/blog\/longest-common-substring\/?utm_source=Ib&utm_medium=webstories&utm_campaign=longest-common-substring","icon":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/10\/14-Subset-Sum-Problem.jpg","needsProxy":false,"ctaText":"Find out 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":220,"mask":{"type":"rectangle"},"isBackground":true,"type":"image","id":"76638dd5-e923-4c37-8934-99f03447a159","scale":100,"focalX":50,"focalY":50,"resource":{"baseColor":"#f3f3f3","blurHash":"LWMZ{[?wH?%g?ufmo|x]v}Nw-pW;","type":"image","mimeType":"image\/jpeg","creationDate":"2019-11-07T22:10:23Z","src":"https:\/\/images.unsplash.com\/photo-1573164574397-dd250bc8a598?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw3OHx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjcwMzM2Mjk2&ixlib=rb-4.0.3&fm=jpg&w=6016&h=4016&fit=max","width":6016,"height":4016,"id":"media\/unsplash:UcZcsHSp8o4","alt":"photography of three women sits beside table inside room during daytime","sizes":{"full":{"file":"media\/unsplash:UcZcsHSp8o4","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573164574397-dd250bc8a598?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw3OHx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjcwMzM2Mjk2&ixlib=rb-4.0.3&fm=jpg&w=6016&h=4016&fit=max","mimeType":"image\/jpeg","width":6016,"height":4016},"large":{"file":"media\/unsplash:UcZcsHSp8o4","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573164574397-dd250bc8a598?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw3OHx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjcwMzM2Mjk2&ixlib=rb-4.0.3&fm=jpg&w=4812&h=3212&fit=max","mimeType":"image\/jpeg","width":4812,"height":3212},"3609_2409":{"file":"media\/unsplash:UcZcsHSp8o4","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573164574397-dd250bc8a598?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw3OHx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjcwMzM2Mjk2&ixlib=rb-4.0.3&fm=jpg&w=3609&h=2409&fit=max","mimeType":"image\/jpeg","width":3609,"height":2409},"2406_1606":{"file":"media\/unsplash:UcZcsHSp8o4","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573164574397-dd250bc8a598?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw3OHx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjcwMzM2Mjk2&ixlib=rb-4.0.3&fm=jpg&w=2406&h=1606&fit=max","mimeType":"image\/jpeg","width":2406,"height":1606},"1203_803":{"file":"media\/unsplash:UcZcsHSp8o4","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573164574397-dd250bc8a598?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw3OHx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjcwMzM2Mjk2&ixlib=rb-4.0.3&fm=jpg&w=1203&h=803&fit=max","mimeType":"image\/jpeg","width":1203,"height":803},"web_stories_thumbnail":{"file":"media\/unsplash:UcZcsHSp8o4","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573164574397-dd250bc8a598?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw3OHx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjcwMzM2Mjk2&ixlib=rb-4.0.3&fm=jpg&w=340&h=227&fit=max","mimeType":"image\/jpeg","width":340,"height":227}},"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=AWJwhCECO\/YKgPJJp2cmQoF6fUCVlaVawJi1ntit\/8j7ClCj7cknUXKaOpOp1thzacWJX4pSUqZ9Y4fmKuDsNeyKx0XmP30KEVz1kWhBqH4iEXS8SDPA\/RxBUrcYV0DlIj4xoeNyBGn\/B5NXfm\/1TL01QkeZrI7Gtv1WSwTL6DhBA7Uc3OHvyaOY2XzssGoVYPC%2BBYvcw3Inmf9P4%2BUsso64vm\/JnRKnuabILESqBgWi5devJHX2fmloIpytkA4Zh\/E5HA%3D%3D"},"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":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":0,"y":-39,"width":180,"height":60,"mask":{"type":"rectangle"},"basedOn":"a3bb84b5-e208-4e2a-936f-5611c92d7d16","id":"90701d05-70b8-48ba-9066-72199e99b3ce","type":"image"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"NONE","font":{"family":"Darker Grotesque"},"fontSize":30,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":1.2,"textAlign":"left","padding":{"locked":true,"hasHiddenPadding":false,"horizontal":null,"vertical":null},"content":"<span style=\"font-weight: 700; color: #347eff\">Let's take an example to understand the problem better.<\/span>","borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"width":352,"height":113,"basedOn":"861b8e8e-f3c3-4a43-b68e-3e3422474d74","x":39,"y":110,"groupId":null,"id":"94bfec13-62c1-4925-8c9b-5e13821d634a","type":"text"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"NONE","font":{"family":"Darker Grotesque"},"fontSize":30,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":1.2,"textAlign":"left","padding":{"locked":true,"hasHiddenPadding":false,"horizontal":null,"vertical":null},"content":"<span style=\"font-weight: 700; color: #fff\">Input s1: <\/span><span style=\"color: #fff\">\u201cdadef\u201d&nbsp;<\/span>\n<span style=\"color: #fff\">s2: \u201cadwce\u201d&nbsp;<\/span>\n\n<span style=\"font-weight: 700; color: #fff\">Output: <\/span><span style=\"color: #fff\">2&nbsp;<\/span>\n\n<span style=\"font-weight: 700; color: #fff\">Explanation:<\/span><span style=\"color: #fff\"> Substring \u201cad\u201d of length 2 is the longest.<\/span>","borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"width":352,"height":256,"basedOn":"94bfec13-62c1-4925-8c9b-5e13821d634a","x":39,"y":267,"groupId":null,"id":"beb9cd08-b670-4372-bebb-c5ab5af8e430","type":"text"}],"backgroundColor":{"color":{"r":255,"g":255,"b":255}},"animations":[{"id":"a129a4c7-421b-4505-8ee3-1f4e75e4a644","type":"effect-zoom","scaleDirection":"scaleIn","duration":2000,"delay":0,"targets":["94bfec13-62c1-4925-8c9b-5e13821d634a"]},{"id":"0982aa78-ae67-43a7-a657-68a501969d69","type":"effect-background-zoom","zoomDirection":"scaleOut","duration":2000,"delay":0,"targets":["76638dd5-e923-4c37-8934-99f03447a159"]},{"id":"125d0481-b8ed-4e8a-a717-01c0d72336d0","type":"effect-zoom","scaleDirection":"scaleIn","duration":2000,"delay":0,"targets":["beb9cd08-b670-4372-bebb-c5ab5af8e430"]}],"id":"89c46d12-909f-4a7b-b582-777f409a4ac2","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":"283242a8-1ccf-4e4a-b65c-4ffac79f766a"},"pageAttachment":{"url":"https:\/\/www.interviewbit.com\/blog\/longest-common-substring\/?utm_source=Ib&utm_medium=webstories&utm_campaign=longest-common-substring","icon":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/10\/Longest-Common-Substring.jpg","needsProxy":false,"ctaText":"Check more examples"}},{"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":"76638dd5-e923-4c37-8934-99f03447a159","scale":100,"focalX":50,"focalY":50,"resource":{"baseColor":"#d9d9d9","blurHash":"LjK^yzv|NGt6_NWBoKxubckqIobc","type":"image","mimeType":"image\/jpeg","creationDate":"2019-11-07T22:10:23Z","src":"https:\/\/images.unsplash.com\/photo-1573164574511-73c773193279?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxMDh8fHNvZnR3YXJlJTIwZGV2ZWxvcGVyfGVufDB8fHx8MTY3MDMzNjMzMA&ixlib=rb-4.0.3&fm=jpg&w=6016&h=4016&fit=max","width":6016,"height":4016,"id":"media\/unsplash:rg1y72eKw6o","alt":"photography of people inside room during daytime","sizes":{"full":{"file":"media\/unsplash:rg1y72eKw6o","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573164574511-73c773193279?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxMDh8fHNvZnR3YXJlJTIwZGV2ZWxvcGVyfGVufDB8fHx8MTY3MDMzNjMzMA&ixlib=rb-4.0.3&fm=jpg&w=6016&h=4016&fit=max","mimeType":"image\/jpeg","width":6016,"height":4016},"large":{"file":"media\/unsplash:rg1y72eKw6o","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573164574511-73c773193279?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxMDh8fHNvZnR3YXJlJTIwZGV2ZWxvcGVyfGVufDB8fHx8MTY3MDMzNjMzMA&ixlib=rb-4.0.3&fm=jpg&w=4812&h=3212&fit=max","mimeType":"image\/jpeg","width":4812,"height":3212},"3609_2409":{"file":"media\/unsplash:rg1y72eKw6o","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573164574511-73c773193279?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxMDh8fHNvZnR3YXJlJTIwZGV2ZWxvcGVyfGVufDB8fHx8MTY3MDMzNjMzMA&ixlib=rb-4.0.3&fm=jpg&w=3609&h=2409&fit=max","mimeType":"image\/jpeg","width":3609,"height":2409},"2406_1606":{"file":"media\/unsplash:rg1y72eKw6o","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573164574511-73c773193279?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxMDh8fHNvZnR3YXJlJTIwZGV2ZWxvcGVyfGVufDB8fHx8MTY3MDMzNjMzMA&ixlib=rb-4.0.3&fm=jpg&w=2406&h=1606&fit=max","mimeType":"image\/jpeg","width":2406,"height":1606},"1203_803":{"file":"media\/unsplash:rg1y72eKw6o","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573164574511-73c773193279?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxMDh8fHNvZnR3YXJlJTIwZGV2ZWxvcGVyfGVufDB8fHx8MTY3MDMzNjMzMA&ixlib=rb-4.0.3&fm=jpg&w=1203&h=803&fit=max","mimeType":"image\/jpeg","width":1203,"height":803},"web_stories_thumbnail":{"file":"media\/unsplash:rg1y72eKw6o","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573164574511-73c773193279?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxMDh8fHNvZnR3YXJlJTIwZGV2ZWxvcGVyfGVufDB8fHx8MTY3MDMzNjMzMA&ixlib=rb-4.0.3&fm=jpg&w=340&h=227&fit=max","mimeType":"image\/jpeg","width":340,"height":227}},"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=AWJwhCFcgWOB8O4wGdNrsMGyJwnTqyKLehN0FuFqNYyrxJVXxXJq6rfp7OjoSTDQSEVFYBxu3UXDi743W3AyZLSELiTtzAmW9z4CAmO7oz43orQ9AeVnbJo4y%2BuzJSaFtpX9g6vNSND\/XvDGQt35uPVoN9p0k%2Bd8vqKaRRBHy4ntdzXQuSjcaktuxqRXc2ygb3zDeJmS6JkbU9%2BzDZiKse2zeMQYh1w9B8S12rvNZM\/2hfCY11iO\/X0W4FRBkFOXiqCnBuE8"},"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":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":0,"y":-39,"width":180,"height":60,"mask":{"type":"rectangle"},"basedOn":"90701d05-70b8-48ba-9066-72199e99b3ce","id":"ca607fc3-47ce-46f2-be0f-336346011aab","type":"image"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"NONE","font":{"family":"Darker Grotesque"},"fontSize":30,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":1.2,"textAlign":"left","padding":{"locked":true,"hasHiddenPadding":false,"horizontal":null,"vertical":null},"content":"<span style=\"color: #fff\">Are you curious about the different approaches to find out the longest common substring? Let's dive in and explore them together!<\/span>","borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"width":341,"height":184,"basedOn":"94bfec13-62c1-4925-8c9b-5e13821d634a","x":36,"y":238,"groupId":null,"id":"91e1f96d-98c1-4640-bbd8-2ceb2f611100","type":"text"}],"backgroundColor":{"color":{"r":255,"g":255,"b":255}},"animations":[{"id":"d1757342-184c-48e6-a327-1672fa4c6095","type":"effect-zoom","scaleDirection":"scaleIn","duration":2000,"delay":0,"targets":["91e1f96d-98c1-4640-bbd8-2ceb2f611100"]},{"id":"131e3b65-acd7-4888-9d8b-d6d7b74aae20","type":"effect-background-zoom","zoomDirection":"scaleOut","duration":2000,"delay":0,"targets":["76638dd5-e923-4c37-8934-99f03447a159"]}],"id":"de3e1538-90d1-44c3-9dc1-e9eb15aea441","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":"27f2951c-8b6e-4772-8cc9-8a5b431fd5c6"},"pageAttachment":{"url":"https:\/\/www.interviewbit.com\/blog\/longest-common-substring\/?utm_source=Ib&utm_medium=webstories&utm_campaign=longest-common-substring","icon":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/10\/Longest-Common-Substring.jpg","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":220,"mask":{"type":"rectangle"},"isBackground":true,"type":"image","id":"27f2951c-8b6e-4772-8cc9-8a5b431fd5c6","scale":100,"focalX":50,"focalY":50,"resource":{"baseColor":"#f3a673","blurHash":"LjL|T1tTAvs9pytR-oRj%3WXadae","type":"image","mimeType":"image\/jpeg","creationDate":"2019-11-07T22:31:26Z","src":"https:\/\/images.unsplash.com\/photo-1573165759995-5865a394a1aa?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw2M3x8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjY5OTAyNjU0&ixlib=rb-4.0.3&fm=jpg&w=6016&h=4016&fit=max","width":6016,"height":4016,"id":"media\/unsplash:eS72kLFS6s0","alt":"people sitting beside rectangular brown table with laptops","sizes":{"full":{"file":"media\/unsplash:eS72kLFS6s0","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573165759995-5865a394a1aa?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw2M3x8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjY5OTAyNjU0&ixlib=rb-4.0.3&fm=jpg&w=6016&h=4016&fit=max","mimeType":"image\/jpeg","width":6016,"height":4016},"large":{"file":"media\/unsplash:eS72kLFS6s0","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573165759995-5865a394a1aa?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw2M3x8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjY5OTAyNjU0&ixlib=rb-4.0.3&fm=jpg&w=4812&h=3212&fit=max","mimeType":"image\/jpeg","width":4812,"height":3212},"3609_2409":{"file":"media\/unsplash:eS72kLFS6s0","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573165759995-5865a394a1aa?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw2M3x8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjY5OTAyNjU0&ixlib=rb-4.0.3&fm=jpg&w=3609&h=2409&fit=max","mimeType":"image\/jpeg","width":3609,"height":2409},"2406_1606":{"file":"media\/unsplash:eS72kLFS6s0","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573165759995-5865a394a1aa?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw2M3x8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjY5OTAyNjU0&ixlib=rb-4.0.3&fm=jpg&w=2406&h=1606&fit=max","mimeType":"image\/jpeg","width":2406,"height":1606},"1203_803":{"file":"media\/unsplash:eS72kLFS6s0","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573165759995-5865a394a1aa?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw2M3x8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjY5OTAyNjU0&ixlib=rb-4.0.3&fm=jpg&w=1203&h=803&fit=max","mimeType":"image\/jpeg","width":1203,"height":803},"web_stories_thumbnail":{"file":"media\/unsplash:eS72kLFS6s0","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573165759995-5865a394a1aa?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw2M3x8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjY5OTAyNjU0&ixlib=rb-4.0.3&fm=jpg&w=340&h=227&fit=max","mimeType":"image\/jpeg","width":340,"height":227}},"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=AWJwhCHWU%2BqKzAr8\/GMMQVqPspJuX\/C4Xn4rECmLCV93N90uMAWDH%2BKbqdnoOqXHGHKDD7ORnoiR6GvvJ7v0RNNjP3nS4zANKxaEwC4Bhg6YKPudMdd2JHUfoWW01GGoGeh7mk2drSQJAZoy2Ygz8%2BumHKJ6UoMmf18E4cxvxK0IkDv3ea6ziG0wErS304bHYKpDsaB5zdJdI1LqNlnevp1o60i00RsEq5aP\/1KdyXWyarkr95ZXY3ragEV1iFhrOJmonA%3D%3D"},"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":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":0,"y":-39,"width":180,"height":60,"mask":{"type":"rectangle"},"basedOn":"ca607fc3-47ce-46f2-be0f-336346011aab","id":"f24b57dc-e5b9-416a-be22-4a071ebd4794","type":"image"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"NONE","font":{"family":"Darker Grotesque"},"fontSize":30,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":1.2,"textAlign":"left","padding":{"locked":true,"hasHiddenPadding":false,"horizontal":null,"vertical":null},"content":"<span style=\"color: #fff\">The simple approach checks for every substring of sequence 1 whether it is also a substring in sequence 2.<\/span>","borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"width":352,"height":149,"basedOn":"91e1f96d-98c1-4640-bbd8-2ceb2f611100","x":29,"y":218,"groupId":null,"id":"9cdf83be-84a7-4e37-9e13-228230d7f1b6","type":"text"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"FILL","font":{"family":"Darker Grotesque"},"fontSize":47,"backgroundColor":{"color":{"r":5,"g":34,"b":88}},"lineHeight":0.9,"textAlign":"center","padding":{"locked":true,"hasHiddenPadding":true,"horizontal":8,"vertical":4},"content":"<span style=\"font-weight: 700; color: #3372e0\">Simple Approach<\/span>","borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"x":0,"y":29,"width":410,"height":71,"marginOffset":-33.45600000000001,"basedOn":"9c230cad-a36e-4bfe-864b-cdbff9f1f09e","groupId":null,"id":"bf031369-9acb-4a1f-a10c-256e58b91515","type":"text"}],"backgroundColor":{"color":{"r":255,"g":255,"b":255}},"animations":[{"id":"716e5d49-d654-4dca-86d2-fcf61887a02d","type":"effect-background-zoom","zoomDirection":"scaleOut","duration":2000,"delay":0,"targets":["27f2951c-8b6e-4772-8cc9-8a5b431fd5c6"]},{"id":"767e7744-400f-4a7a-b7a9-0c824b2f80b9","type":"effect-zoom","scaleDirection":"scaleIn","duration":2000,"delay":0,"targets":["9cdf83be-84a7-4e37-9e13-228230d7f1b6"]},{"targets":["bf031369-9acb-4a1f-a10c-256e58b91515"],"id":"f5f89b39-a52e-4291-bd2b-174567048799","type":"effect-zoom","scaleDirection":"scaleIn","duration":2000,"delay":0}],"id":"9e5d6a53-c17c-415a-b590-e6df6d6fd3f4","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":"0173d9f5-2320-425e-80b2-65ec1d738f9c"},"pageAttachment":{"url":"https:\/\/www.interviewbit.com\/blog\/longest-common-substring\/?utm_source=Ib&utm_medium=webstories&utm_campaign=longest-common-substring","icon":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/10\/Longest-Common-Substring.jpg","needsProxy":false,"ctaText":"Checkout its algorithm"}},{"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":"4bea2dab-2033-49a6-a9a8-b6dc345abb9c","scale":100,"focalX":50,"focalY":50,"resource":{"type":"image","mimeType":"image\/jpeg","width":6016,"height":4016,"sizes":{"full":{"file":"media\/unsplash:c6wbSBaYxkY","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573165706511-3ffde6ef1fe3?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxM3x8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY3MjkyMDQ4OQ&ixlib=rb-4.0.3&fm=jpg&w=6016&h=4016&fit=max","mimeType":"image\/jpeg","width":6016,"height":4016},"large":{"file":"media\/unsplash:c6wbSBaYxkY","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573165706511-3ffde6ef1fe3?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxM3x8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY3MjkyMDQ4OQ&ixlib=rb-4.0.3&fm=jpg&w=4812&h=3212&fit=max","mimeType":"image\/jpeg","width":4812,"height":3212},"3609_2409":{"file":"media\/unsplash:c6wbSBaYxkY","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573165706511-3ffde6ef1fe3?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxM3x8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY3MjkyMDQ4OQ&ixlib=rb-4.0.3&fm=jpg&w=3609&h=2409&fit=max","mimeType":"image\/jpeg","width":3609,"height":2409},"2406_1606":{"file":"media\/unsplash:c6wbSBaYxkY","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573165706511-3ffde6ef1fe3?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxM3x8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY3MjkyMDQ4OQ&ixlib=rb-4.0.3&fm=jpg&w=2406&h=1606&fit=max","mimeType":"image\/jpeg","width":2406,"height":1606},"1203_803":{"file":"media\/unsplash:c6wbSBaYxkY","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573165706511-3ffde6ef1fe3?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxM3x8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY3MjkyMDQ4OQ&ixlib=rb-4.0.3&fm=jpg&w=1203&h=803&fit=max","mimeType":"image\/jpeg","width":1203,"height":803},"web_stories_thumbnail":{"file":"media\/unsplash:c6wbSBaYxkY","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573165706511-3ffde6ef1fe3?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxM3x8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY3MjkyMDQ4OQ&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:c6wbSBaYxkY","baseColor":"#262626","blurHash":"LfHBSZwatRI;~UM_t8Rj-URjM|R+","creationDate":"2019-11-07T22:31:26Z","src":"https:\/\/images.unsplash.com\/photo-1573165706511-3ffde6ef1fe3?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxM3x8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY3MjkyMDQ4OQ&ixlib=rb-4.0.3&fm=jpg&w=6016&h=4016&fit=max","alt":"three women sitting beside wooden table","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=AXhJFEdJpTQhya4OyY%2BSgPEGH7SB9a7rv6KzX%2BLUgwsFBBCS5p2fKkkeyAnOO%2BapZ7ma1hu2eyb0o9We1ppDCrG%2Be9T2DOt3L59vhxPv%2Bors17KeKHuhGecyOcuAa%2B8R9aumrDhldwtVTsPDzJh9xGbuEquFMePRQwPOekDh5783\/eLbiOEvr\/Bze8rAvuzAweCNSznvK3KroG2wvXYXWIXYCPL6lU80P9f5xcntvK06ygFxUPe1hKUrjII3VNGIjFvUPjao"}},"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":0,"y":-39,"width":180,"height":60,"mask":{"type":"rectangle"},"basedOn":"f24b57dc-e5b9-416a-be22-4a071ebd4794","id":"2ad5ac42-0aab-4934-a886-dd828e311d1a","type":"image"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"NONE","font":{"family":"Darker Grotesque"},"fontSize":30,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":1.2,"textAlign":"left","padding":{"locked":true,"hasHiddenPadding":false,"horizontal":null,"vertical":null},"content":"<span style=\"color: #fff\">The recursive strategy involves repeatedly comparing characters of both sequences, and maximize the match if they are identical.<\/span>","borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"width":352,"height":184,"basedOn":"9cdf83be-84a7-4e37-9e13-228230d7f1b6","x":36,"y":217,"groupId":null,"id":"10752c12-70a7-4a16-8ef9-0e5287245dc9","type":"text"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"FILL","font":{"family":"Darker Grotesque"},"fontSize":47,"backgroundColor":{"color":{"r":5,"g":34,"b":88}},"lineHeight":0.9,"textAlign":"center","padding":{"locked":true,"hasHiddenPadding":true,"horizontal":8,"vertical":4},"content":"<span style=\"font-weight: 700; color: #3372e0\">Recursive Approach<\/span>","borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"x":0,"y":29,"width":410,"height":71,"marginOffset":-33.45600000000001,"basedOn":"a727cbf9-964e-41bd-b669-dbd2d8feaaa7","groupId":null,"id":"57873e8b-55df-446d-96f9-0af9e4ce24c7","type":"text"}],"backgroundColor":{"color":{"r":255,"g":255,"b":255}},"animations":[{"id":"a085bb41-cadd-41ec-8f93-9404e9f53204","type":"effect-background-zoom","zoomDirection":"scaleOut","duration":2000,"delay":0,"targets":["4bea2dab-2033-49a6-a9a8-b6dc345abb9c"]},{"id":"1ed8c261-1b0e-4640-8245-82ecc9d30abe","type":"effect-zoom","scaleDirection":"scaleIn","duration":2000,"delay":0,"targets":["10752c12-70a7-4a16-8ef9-0e5287245dc9"]},{"targets":["57873e8b-55df-446d-96f9-0af9e4ce24c7"],"id":"b68404c2-f219-4910-b919-b89bb9147f36","type":"effect-zoom","scaleDirection":"scaleIn","duration":2000,"delay":0}],"id":"cf434d3e-3132-4b3c-87e0-5ae80860d37a","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":"07cb1230-628a-4b45-910c-b13bf7f662ea"},"pageAttachment":{"url":"https:\/\/www.interviewbit.com\/blog\/longest-common-substring\/?utm_source=Ib&utm_medium=webstories&utm_campaign=longest-common-substring","icon":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/10\/Longest-Common-Substring.jpg","needsProxy":false,"ctaText":"Checkout its algorithm"}},{"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":"07cb1230-628a-4b45-910c-b13bf7f662ea","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=MnwxMzcxOTN8MHwxfHNlYXJjaHw0NHx8amF2YSUyMGRldmVsb3BlcnxlbnwwfHx8fDE2NzMwMDg0NzY&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=MnwxMzcxOTN8MHwxfHNlYXJjaHw0NHx8amF2YSUyMGRldmVsb3BlcnxlbnwwfHx8fDE2NzMwMDg0NzY&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=MnwxMzcxOTN8MHwxfHNlYXJjaHw0NHx8amF2YSUyMGRldmVsb3BlcnxlbnwwfHx8fDE2NzMwMDg0NzY&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=MnwxMzcxOTN8MHwxfHNlYXJjaHw0NHx8amF2YSUyMGRldmVsb3BlcnxlbnwwfHx8fDE2NzMwMDg0NzY&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=MnwxMzcxOTN8MHwxfHNlYXJjaHw0NHx8amF2YSUyMGRldmVsb3BlcnxlbnwwfHx8fDE2NzMwMDg0NzY&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=MnwxMzcxOTN8MHwxfHNlYXJjaHw0NHx8amF2YSUyMGRldmVsb3BlcnxlbnwwfHx8fDE2NzMwMDg0NzY&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=MnwxMzcxOTN8MHwxfHNlYXJjaHw0NHx8amF2YSUyMGRldmVsb3BlcnxlbnwwfHx8fDE2NzMwMDg0NzY&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=AXhJFEcEY%2BT7c0qTV1kZVyncP1bslVbnc1dE7RsCCOxz2qoRLxJrmb7JVftbWn%2BZ5HCst6ZrN5RASgilHjFmh\/NokkrOX%2BYHinbYI2pESFPJl4vVJkQCvYE3GumNPGxnxtYHDatbuYeb%2BBO5%2BEH2xylRdagcyIQbaO3bb1KYXRl%2BZNnCRR4dqB0\/TLmgERYMQaruO8DfuHJeATfU7cTkhG7UElOwWk%2Bn0goYHsDPl0zfj\/AUuzEcctZ8\/YvKdts%3D"}},"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":0,"y":-39,"width":180,"height":60,"mask":{"type":"rectangle"},"basedOn":"41a8dcee-ac6c-4e09-becf-468b8665bb19","id":"ddd85b20-5151-46db-b5aa-6c37b1273284","type":"image"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"NONE","font":{"family":"Darker Grotesque"},"fontSize":30,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":1.2,"textAlign":"left","padding":{"locked":true,"hasHiddenPadding":false,"horizontal":null,"vertical":null},"content":"<span style=\"font-weight: 700; color: #347eff\">Time complexity: <\/span><span style=\"color: #fff\">O(3 ^(n*m)), where n and m are lengths of sequences.&nbsp;<\/span>\n\n<span style=\"font-weight: 700; color: #347eff\">Space complexity:<\/span><span style=\"color: #347eff\"> <\/span><span style=\"color: #fff\">O(max(n, m))<\/span>","borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"width":352,"height":221,"basedOn":"d2221497-d2ea-45d3-8599-eaabe9e325ef","x":30,"y":225,"groupId":null,"id":"5a80f896-83ce-48d0-b555-413c716f09c1","type":"text"}],"backgroundColor":{"color":{"r":255,"g":255,"b":255}},"animations":[{"id":"f1474678-2664-42cc-841f-856a33508eaf","type":"effect-zoom","scaleDirection":"scaleIn","duration":2000,"delay":0,"targets":["5a80f896-83ce-48d0-b555-413c716f09c1"]},{"id":"cbfe5f2d-e577-4a06-82ee-75b0f55761ff","type":"effect-background-zoom","zoomDirection":"scaleOut","duration":2000,"delay":0,"targets":["07cb1230-628a-4b45-910c-b13bf7f662ea"]}],"id":"015ce16c-01eb-4503-a5fd-c69fd2ace5d2","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":"abc994fd-18e5-4821-9439-6a805f711046"},"pageAttachment":{"url":"https:\/\/www.interviewbit.com\/blog\/longest-common-substring\/?utm_source=Ib&utm_medium=webstories&utm_campaign=longest-common-substring","icon":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/10\/Longest-Common-Substring.jpg","needsProxy":false,"ctaText":"See code implementation"}},{"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":"abc994fd-18e5-4821-9439-6a805f711046","scale":100,"focalX":50,"focalY":50,"resource":{"type":"image","mimeType":"image\/jpeg","width":4016,"height":6016,"sizes":{"full":{"file":"media\/unsplash:7VmGD9XkYOU","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573495627094-cbfef909a47b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw4MHx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjczNDQzODM1&ixlib=rb-4.0.3&fm=jpg&w=4016&h=6016&fit=max","mimeType":"image\/jpeg","width":4016,"height":6016},"large":{"file":"media\/unsplash:7VmGD9XkYOU","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573495627094-cbfef909a47b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw4MHx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjczNDQzODM1&ixlib=rb-4.0.3&fm=jpg&w=3212&h=4812&fit=max","mimeType":"image\/jpeg","width":3212,"height":4812},"2409_3609":{"file":"media\/unsplash:7VmGD9XkYOU","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573495627094-cbfef909a47b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw4MHx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjczNDQzODM1&ixlib=rb-4.0.3&fm=jpg&w=2409&h=3609&fit=max","mimeType":"image\/jpeg","width":2409,"height":3609},"1606_2406":{"file":"media\/unsplash:7VmGD9XkYOU","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573495627094-cbfef909a47b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw4MHx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjczNDQzODM1&ixlib=rb-4.0.3&fm=jpg&w=1606&h=2406&fit=max","mimeType":"image\/jpeg","width":1606,"height":2406},"803_1203":{"file":"media\/unsplash:7VmGD9XkYOU","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573495627094-cbfef909a47b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw4MHx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjczNDQzODM1&ixlib=rb-4.0.3&fm=jpg&w=803&h=1203&fit=max","mimeType":"image\/jpeg","width":803,"height":1203},"web_stories_thumbnail":{"file":"media\/unsplash:7VmGD9XkYOU","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573495627094-cbfef909a47b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw4MHx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjczNDQzODM1&ixlib=rb-4.0.3&fm=jpg&w=340&h=509&fit=max","mimeType":"image\/jpeg","width":340,"height":509}},"isPlaceholder":false,"isExternal":true,"needsProxy":false,"id":"media\/unsplash:7VmGD9XkYOU","baseColor":"#f3f3f3","blurHash":"LzN,[69FRjxu~qxuazoftRt7t7M{","creationDate":"2019-11-11T18:11:49Z","src":"https:\/\/images.unsplash.com\/photo-1573495627094-cbfef909a47b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw4MHx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjczNDQzODM1&ixlib=rb-4.0.3&fm=jpg&w=4016&h=6016&fit=max","alt":"shallow focus photo of woman using gray laptop computer","attribution":{"author":{"displayName":"Christina @ wocintechchat.com","url":"https:\/\/unsplash.com\/fr\/@wocintechchat?utm_source=web_stories_wordpress&utm_medium=referral"},"registerUsageUrl":"https:\/\/media3p.googleapis.com\/v1\/media:registerUsage?token=AXhJFEcL27\/qCe6Za60a\/mUu2t%2Bh9ivyL1F7btcqJDOjuR3X%2BLHAQj7EnjcR6LGjJM%2B99yMyYTURXY\/5iGRAVRVy50hpwveDKfDOT8nKPPOxwjbCOSNS1WVevKSNne1L7poD9k5vR6%2BUf3d\/nnG2wMiG8lY46GVO%2BQAgLKNl6azIvdvLXzxtqSouXN1D%2BXkK9%2BdsVD0nXZgTovk1K9IbsaASfUVXhR6EzoJX1uRBjV2kw8KIw%2Bz\/1y7Szenitaduae9nfA%3D%3D"}},"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":0,"y":-39,"width":180,"height":60,"mask":{"type":"rectangle"},"basedOn":"ddd85b20-5151-46db-b5aa-6c37b1273284","id":"0a76cce9-5584-441b-bdfc-8adb40d0cc18","type":"image"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"NONE","font":{"family":"Darker Grotesque"},"fontSize":30,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":1.2,"textAlign":"left","padding":{"locked":true,"hasHiddenPadding":false,"horizontal":null,"vertical":null},"content":"<span style=\"color: #fff\">The optimal approach is to employ dynamic programming of storing sub-problems. This entails determining the longest common suffix for all sub-strings in both sequences.<\/span>","borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"width":352,"height":221,"basedOn":"5a80f896-83ce-48d0-b555-413c716f09c1","x":30,"y":257,"groupId":null,"id":"68dc11dc-e204-44c0-b174-4c7e4f8d8ead","type":"text"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"FILL","font":{"family":"Darker Grotesque"},"fontSize":47,"backgroundColor":{"color":{"r":5,"g":34,"b":88}},"lineHeight":0.9,"textAlign":"center","padding":{"locked":true,"hasHiddenPadding":true,"horizontal":8,"vertical":4},"content":"<span style=\"font-weight: 700; color: #3372e0\">Dynamic Programming Approach<\/span>","borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"x":0,"y":29,"width":410,"height":156,"marginOffset":-33.45600000000001,"basedOn":"a727cbf9-964e-41bd-b669-dbd2d8feaaa7","groupId":null,"id":"c443c2c6-2783-4348-9cb4-4ac952ad3b88","type":"text"}],"backgroundColor":{"color":{"r":255,"g":255,"b":255}},"animations":[{"id":"76997c67-7ae8-4a63-89cd-4f6d319f3149","type":"effect-zoom","scaleDirection":"scaleIn","duration":2000,"delay":0,"targets":["68dc11dc-e204-44c0-b174-4c7e4f8d8ead"]},{"id":"5fa4a8b3-d0ad-4d6e-a0a4-c6cf80843bcc","type":"effect-background-zoom","zoomDirection":"scaleOut","duration":2000,"delay":0,"targets":["abc994fd-18e5-4821-9439-6a805f711046"]},{"targets":["c443c2c6-2783-4348-9cb4-4ac952ad3b88"],"id":"5febd37f-b588-4686-82f3-c3dba694b661","type":"effect-zoom","scaleDirection":"scaleIn","duration":2000,"delay":0}],"id":"8df77031-9e15-4779-a2a9-fe68c9e86633","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":"1a4302e2-14d2-4e1b-a167-83e3c20cc912"},"pageAttachment":{"url":"https:\/\/www.interviewbit.com\/blog\/longest-common-substring\/?utm_source=Ib&utm_medium=webstories&utm_campaign=longest-common-substring","icon":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/10\/Longest-Common-Substring.jpg","needsProxy":false,"ctaText":"Checkout its algorithm"}},{"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":"1a4302e2-14d2-4e1b-a167-83e3c20cc912","scale":100,"focalX":50,"focalY":50,"resource":{"baseColor":"#262626","blurHash":"LKBWJL0KWB%L~W9Gxut7xZIoxus:","type":"image","mimeType":"image\/jpeg","creationDate":"2021-09-14T12:57:24Z","src":"https:\/\/images.unsplash.com\/photo-1631624210938-539575f92e3c?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwyNHx8c29mdHdhcmUlMjBkZXZlbG9wbWVudHxlbnwwfHx8fDE2NjYwMDQwNzM&ixlib=rb-1.2.1&fm=jpg&w=4000&h=6000&fit=max","width":4000,"height":6000,"id":"media\/unsplash:7wLQNYKL3Rw","alt":"media\/unsplash:7wLQNYKL3Rw","sizes":{"full":{"file":"media\/unsplash:7wLQNYKL3Rw","sourceUrl":"https:\/\/images.unsplash.com\/photo-1631624210938-539575f92e3c?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwyNHx8c29mdHdhcmUlMjBkZXZlbG9wbWVudHxlbnwwfHx8fDE2NjYwMDQwNzM&ixlib=rb-1.2.1&fm=jpg&w=4000&h=6000&fit=max","mimeType":"image\/jpeg","width":4000,"height":6000},"large":{"file":"media\/unsplash:7wLQNYKL3Rw","sourceUrl":"https:\/\/images.unsplash.com\/photo-1631624210938-539575f92e3c?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwyNHx8c29mdHdhcmUlMjBkZXZlbG9wbWVudHxlbnwwfHx8fDE2NjYwMDQwNzM&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:7wLQNYKL3Rw","sourceUrl":"https:\/\/images.unsplash.com\/photo-1631624210938-539575f92e3c?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwyNHx8c29mdHdhcmUlMjBkZXZlbG9wbWVudHxlbnwwfHx8fDE2NjYwMDQwNzM&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:7wLQNYKL3Rw","sourceUrl":"https:\/\/images.unsplash.com\/photo-1631624210938-539575f92e3c?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwyNHx8c29mdHdhcmUlMjBkZXZlbG9wbWVudHxlbnwwfHx8fDE2NjYwMDQwNzM&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:7wLQNYKL3Rw","sourceUrl":"https:\/\/images.unsplash.com\/photo-1631624210938-539575f92e3c?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwyNHx8c29mdHdhcmUlMjBkZXZlbG9wbWVudHxlbnwwfHx8fDE2NjYwMDQwNzM&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:7wLQNYKL3Rw","sourceUrl":"https:\/\/images.unsplash.com\/photo-1631624210938-539575f92e3c?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwyNHx8c29mdHdhcmUlMjBkZXZlbG9wbWVudHxlbnwwfHx8fDE2NjYwMDQwNzM&ixlib=rb-1.2.1&fm=jpg&w=340&h=510&fit=max","mimeType":"image\/jpeg","width":340,"height":510}},"attribution":{"author":{"displayName":"Mikhail Fesenko","url":"https:\/\/unsplash.com\/@proggga?utm_source=web_stories_wordpress&utm_medium=referral"},"registerUsageUrl":"https:\/\/media3p.googleapis.com\/v1\/media:registerUsage?token=AQBR4trhsTBxm\/6gFbgX28yUJ7OS1W92A8NS56%2BLfPfFRmKWvhaCR1BqvtSBkOcWIjMMjaxrNaqCqJHjmNaY4DaaySGy7ArbHIsHLc6GUrXW2rGtkMNlXAhfzs8SATbBi4Ipg5R0XCJtI2D8GL1TwOck4hyBeHMlsR\/RSXRV3gUb%2B338sGPFnHKqnHloW1njXhLYwYR4a4j3Ba5sQ\/rB1BEjQKKnZYfGLTfgm1RVdYakMLP7jr46I\/8EIUTfjlWIlPFyRs3rsA%3D%3D"},"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":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":0,"y":-39,"width":180,"height":60,"mask":{"type":"rectangle"},"basedOn":"0a76cce9-5584-441b-bdfc-8adb40d0cc18","id":"714d4b27-56b9-4059-86b7-f96b9aebf636","type":"image"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"NONE","font":{"family":"Darker Grotesque"},"fontSize":30,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":1.2,"textAlign":"left","padding":{"locked":true,"hasHiddenPadding":false,"horizontal":null,"vertical":null},"content":"<span style=\"font-weight: 700; color: #347eff\">Time complexity: <\/span><span style=\"color: #fff\">O(n*m), where n and m are the lengths of sequences.&nbsp;<\/span>\n\n<span style=\"font-weight: 700; color: #347eff\">Space complexity:<\/span><span style=\"color: #fff\"> O(n*m)<\/span>","borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"width":352,"height":184,"basedOn":"68dc11dc-e204-44c0-b174-4c7e4f8d8ead","x":30,"y":257,"groupId":null,"id":"9e7f24fa-f710-4cd5-96c0-5fca546c5906","type":"text"}],"backgroundColor":{"color":{"r":255,"g":255,"b":255}},"animations":[{"id":"61f48b72-b8b3-4a77-a7ef-37ac86802cd5","type":"effect-zoom","scaleDirection":"scaleIn","duration":2000,"delay":0,"targets":["9e7f24fa-f710-4cd5-96c0-5fca546c5906"]},{"id":"5dceea30-08b5-40ba-942d-60dc96ef9bf5","type":"effect-background-zoom","zoomDirection":"scaleOut","duration":2000,"delay":0,"targets":["1a4302e2-14d2-4e1b-a167-83e3c20cc912"]}],"id":"9cf6163f-6d49-4cd9-b20d-820dab8f09f4","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":"5167a591-246b-4c64-a12d-04d02e7350b1"},"pageAttachment":{"url":"https:\/\/www.interviewbit.com\/blog\/longest-common-substring\/?utm_source=Ib&utm_medium=webstories&utm_campaign=longest-common-substring","icon":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/10\/Longest-Common-Substring.jpg","needsProxy":false,"ctaText":"See code implementation"}},{"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":"07cb1230-628a-4b45-910c-b13bf7f662ea","scale":100,"focalX":50,"focalY":50,"resource":{"baseColor":"#0c2626","blurHash":"L33[xbocMwRkIUWAayof4ma#xvt6","type":"image","mimeType":"image\/jpeg","creationDate":"2015-12-27T03:41:04Z","src":"https:\/\/images.unsplash.com\/photo-1451187580459-43490279c0fa?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxiaWclMjBkYXRhfGVufDB8fHx8MTY3MjY2MDQyNA&ixlib=rb-4.0.3&fm=jpg&w=4256&h=2832&fit=max","width":4256,"height":2832,"id":"media\/unsplash:Q1p7bh3SHj8","alt":"photo of outer space","sizes":{"full":{"file":"media\/unsplash:Q1p7bh3SHj8","sourceUrl":"https:\/\/images.unsplash.com\/photo-1451187580459-43490279c0fa?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxiaWclMjBkYXRhfGVufDB8fHx8MTY3MjY2MDQyNA&ixlib=rb-4.0.3&fm=jpg&w=4256&h=2832&fit=max","mimeType":"image\/jpeg","width":4256,"height":2832},"large":{"file":"media\/unsplash:Q1p7bh3SHj8","sourceUrl":"https:\/\/images.unsplash.com\/photo-1451187580459-43490279c0fa?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxiaWclMjBkYXRhfGVufDB8fHx8MTY3MjY2MDQyNA&ixlib=rb-4.0.3&fm=jpg&w=3404&h=2265&fit=max","mimeType":"image\/jpeg","width":3404,"height":2265},"2553_1699":{"file":"media\/unsplash:Q1p7bh3SHj8","sourceUrl":"https:\/\/images.unsplash.com\/photo-1451187580459-43490279c0fa?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxiaWclMjBkYXRhfGVufDB8fHx8MTY3MjY2MDQyNA&ixlib=rb-4.0.3&fm=jpg&w=2553&h=1699&fit=max","mimeType":"image\/jpeg","width":2553,"height":1699},"1702_1133":{"file":"media\/unsplash:Q1p7bh3SHj8","sourceUrl":"https:\/\/images.unsplash.com\/photo-1451187580459-43490279c0fa?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxiaWclMjBkYXRhfGVufDB8fHx8MTY3MjY2MDQyNA&ixlib=rb-4.0.3&fm=jpg&w=1702&h=1133&fit=max","mimeType":"image\/jpeg","width":1702,"height":1133},"851_566":{"file":"media\/unsplash:Q1p7bh3SHj8","sourceUrl":"https:\/\/images.unsplash.com\/photo-1451187580459-43490279c0fa?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxiaWclMjBkYXRhfGVufDB8fHx8MTY3MjY2MDQyNA&ixlib=rb-4.0.3&fm=jpg&w=851&h=566&fit=max","mimeType":"image\/jpeg","width":851,"height":566},"web_stories_thumbnail":{"file":"media\/unsplash:Q1p7bh3SHj8","sourceUrl":"https:\/\/images.unsplash.com\/photo-1451187580459-43490279c0fa?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwzfHxiaWclMjBkYXRhfGVufDB8fHx8MTY3MjY2MDQyNA&ixlib=rb-4.0.3&fm=jpg&w=340&h=226&fit=max","mimeType":"image\/jpeg","width":340,"height":226}},"attribution":{"author":{"displayName":"NASA","url":"https:\/\/unsplash.com\/@nasa?utm_source=web_stories_wordpress&utm_medium=referral"},"registerUsageUrl":"https:\/\/media3p.googleapis.com\/v1\/media:registerUsage?token=AXhJFEcXHBQIrntAg6HooRUw5WXm7AxzRvs5HbuFuQN8QDw3Ai0kjzjMRQlR%2B1thZZL4roDPCOHwuZcp9O6zjxy9M6fH\/O2EZBkyr14DGGNtIxmkhy6AYPH8Y9vuDiwCgt8kSoj1hkEwYCWfdgp0BluVCg9E08f1HosZr1o%2Ba1LbjJXB%2Bqr\/KxEnWUM2yo06bmnbJyVBRTJLgXBxyjQ77WP3USIywZS9HBCRQihgsJKGoWP9Za4%3D"},"isPlaceholder":false,"isOptimized":false,"isMuted":false,"isExternal":true,"needsProxy":false},"overlay":{"color":{"r":0,"g":0,"b":0,"a":0.4}}},{"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":0,"y":-39,"width":180,"height":60,"mask":{"type":"rectangle"},"basedOn":"2ad5ac42-0aab-4934-a886-dd828e311d1a","id":"380e77ec-becc-4e13-b03c-a3c1bed377c3","type":"image"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"NONE","font":{"family":"Anton"},"fontSize":32,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":1.2,"textAlign":"left","padding":{"horizontal":0,"vertical":0},"x":37,"y":242,"width":298,"height":240,"basedOn":"0da9d65f-e7a1-4e9d-bd40-318673508248","content":"<span style=\"color: #faf4ea\">Want to explore these approaches and learn how to implement them in various programming languages?<\/span>","tagName":"h2","marginOffset":-34.87060546875,"id":"3842812c-d804-48f9-b479-cbae6e5ee4fe","type":"text"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"NONE","font":{"family":"Darker Grotesque"},"fontSize":30,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":1.1,"textAlign":"left","padding":{"locked":true,"hasHiddenPadding":false,"horizontal":0,"vertical":0},"content":"<span style=\"font-weight: 700; color: #347eff\">Click on the link below to start your journey.<\/span>","borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"width":352,"height":74,"basedOn":"68dc11dc-e204-44c0-b174-4c7e4f8d8ead","x":33,"y":480,"groupId":null,"id":"faf98ac9-3bde-42ce-ba57-b4ed553c9aaf","type":"text"}],"backgroundColor":{"color":{"r":255,"g":255,"b":255}},"animations":[{"id":"8c0576c4-8c49-4ed7-8b1d-7616d5423163","type":"effect-fly-in","flyInDir":"leftToRight","duration":1000,"delay":0,"targets":["3842812c-d804-48f9-b479-cbae6e5ee4fe"]},{"id":"7c42a0a9-c699-4851-b2cc-efed927d15b4","type":"effect-zoom","scaleDirection":"scaleIn","duration":2000,"delay":0,"targets":["faf98ac9-3bde-42ce-ba57-b4ed553c9aaf"]}],"id":"936b559d-4dc0-423a-9d89-b4d4ba99b081","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":"5e0b0d71-adf4-40a7-b66a-df56c38694fc"},"pageAttachment":{"url":"https:\/\/www.interviewbit.com\/blog\/longest-common-substring\/?utm_source=Ib&utm_medium=webstories&utm_campaign=longest-common-substring","icon":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/10\/Longest-Common-Substring.jpg","needsProxy":false,"ctaText":"SWIPE UP"}}],"fonts":{"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}},"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}}},"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":15748,"url":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2023\/01\/cropped-longest-common-substring-20th.png","width":640,"height":853,"needsProxy":false},"_links":{"self":[{"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/web-stories\/v1\/web-story\/15746"}],"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":2,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/web-stories\/v1\/web-story\/15746\/revisions"}],"predecessor-version":[{"id":15750,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/web-stories\/v1\/web-story\/15746\/revisions\/15750"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/web-stories\/v1\/media\/15748"}],"wp:attachment":[{"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/web-stories\/v1\/media?parent=15746"}],"wp:term":[{"taxonomy":"web_story_category","embeddable":true,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/web-stories\/v1\/web_story_category?post=15746"},{"taxonomy":"web_story_tag","embeddable":true,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/web-stories\/v1\/web_story_tag?post=15746"}],"wp:lock":[{"embeddable":true,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/web-stories\/v1\/web-story\/15746\/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}]}}