{"id":15183,"date":"2022-12-20T18:18:36","date_gmt":"2022-12-20T12:48:36","guid":{"rendered":"https:\/\/www.interviewbit.com\/blog\/?post_type=web-story&#038;p=15183"},"modified":"2022-12-20T18:18:37","modified_gmt":"2022-12-20T12:48:37","slug":"find-the-longest-substring-without-repeating-characters","status":"publish","type":"web-story","link":"https:\/\/www.interviewbit.com\/blog\/web-stories\/find-the-longest-substring-without-repeating-characters\/","title":{"rendered":"Find the Longest Substring Without Repeating Characters"},"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=Merriweather&amp;family=Roboto&amp;family=Darker+Grotesque%3Awght%40400%3B700&amp;family=Anton\" rel=\"stylesheet\"\/><link href=\"https:\/\/images.unsplash.com\/photo-1521737711867-e3b97375f902?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxNHx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY2NjYyMzI3MA&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=5304&amp;h=7952&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>Find the Longest Substring Without Repeating Characters<\/title><link rel=\"canonical\" href=\"https:\/\/www.interviewbit.com\/blog\/?post_type=web-story&amp;p=15183\"\/><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=\"Find the Longest Substring Without Repeating Characters\" poster-portrait-src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/12\/cropped-longest-substring-without-repeating-characters.jpg\"><amp-story-page id=\"2ba48566-4303-4648-be14-d8b890969253\" 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:#c0c0c0\">\n<div class=\"page-safe-area\">\n<div style=\"position:absolute;pointer-events:none;left:0;top:-9.25926%;width:100%;height:118.51852%;opacity:1\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0\" class=\"mask\" id=\"el-22ae990b-24ec-4f61-9792-67850d36d3d5\">\n<div style=\"position:absolute;width:118.57814%;height:100%;left:-9.28907%;top:0%\" data-leaf-element=\"true\"><amp-img layout=\"fill\" src=\"https:\/\/images.unsplash.com\/photo-1521737711867-e3b97375f902?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxNHx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY2NjYyMzI3MA&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=5304&amp;h=7952&amp;fit=max\" alt=\"men sitting in front of their laptop computer\" srcSet=\"https:\/\/images.unsplash.com\/photo-1521737711867-e3b97375f902?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxNHx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY2NjYyMzI3MA&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=5304&amp;h=7952&amp;fit=max 5304w,https:\/\/images.unsplash.com\/photo-1521737711867-e3b97375f902?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxNHx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY2NjYyMzI3MA&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=4243&amp;h=6361&amp;fit=max 4243w,https:\/\/images.unsplash.com\/photo-1521737711867-e3b97375f902?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxNHx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY2NjYyMzI3MA&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=3182&amp;h=4771&amp;fit=max 3182w,https:\/\/images.unsplash.com\/photo-1521737711867-e3b97375f902?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxNHx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY2NjYyMzI3MA&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=2121&amp;h=3180&amp;fit=max 2121w,https:\/\/images.unsplash.com\/photo-1521737711867-e3b97375f902?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxNHx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY2NjYyMzI3MA&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=1060&amp;h=1589&amp;fit=max 1060w,https:\/\/images.unsplash.com\/photo-1521737711867-e3b97375f902?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxNHx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY2NjYyMzI3MA&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=340&amp;h=510&amp;fit=max 340w\" sizes=\"(min-width: 1024px) 53vh, 119vw\" disable-inline-width=\"true\"><\/amp-img><\/div>\n<div class=\"element-overlay-area\" style=\"background-color:rgba(0,0,0,0.5)\"><\/div>\n<\/div>\n<\/div>\n<div 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-84a9fe46-f171-471f-bb69-fb55fff093d6\">\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:3.64078%;top:59.70874%;width:110.67961%;height:21.35922%;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.43859649122807015% 0.43859649122807015% 0.43859649122807015% 0.43859649122807015% \/ 1.5151515151515151% 1.5151515151515151% 1.5151515151515151% 1.5151515151515151%\" id=\"el-5a03f828-20ca-4b52-b11f-7a23ec19dee9\">\n<h1 id=\"find-the-longest-substring-without-repeating-characters\" class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:0.2644736842105262% 0;font-family:&quot;Merriweather&quot;,serif;font-size:0.582524em;line-height:1.19;text-align:left;padding:0;color:#000000\"><span><span style=\"color: #fff\">Find the Longest Substring Without Repeating Characters<\/span><\/span><\/h1>\n<\/div>\n<\/div>\n<div style=\"position:absolute;pointer-events:none;left:9.95146%;top:92.23301%;width:80.09709%;height:13.26861%;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-6f338729-862c-4acf-9ed6-e37e14299c8a\">\n<div style=\"position:absolute;width:100%;height:107.47869%;left:0%;top:-3.73934%\" data-leaf-element=\"true\"><amp-img layout=\"fill\" src=\"https:\/\/media.tenor.com\/cgriPG-ob9QAAAAi\/fl%C3%A8che-arrow.gif\" alt=\"Fl\u00e8che Arrow Sticker\" srcSet=\"https:\/\/media.tenor.com\/cgriPG-ob9QAAAAi\/fl%C3%A8che-arrow.gif 498w,https:\/\/media.tenor.com\/cgriPG-ob9QAAAAk\/fl%C3%A8che-arrow.gif 90w\" sizes=\"(min-width: 1024px) 36vh, 80vw\" disable-inline-width=\"true\"><\/amp-img><\/div>\n<\/div>\n<\/div>\n<div style=\"position:absolute;pointer-events:none;left:3.64078%;top:82.36246%;width:73.30097%;height:5.66343%;transform:rotate(360deg);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.6622516556291391% 0.6622516556291391% 0.6622516556291391% 0.6622516556291391% \/ 5.714285714285714% 5.714285714285714% 5.714285714285714% 5.714285714285714%\" id=\"el-37afe416-c675-4414-bdbf-55c1747bd284\">\n<h2 id=\"a-quick-overview\" class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:-0.13969370860927152% 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: #e06e04\">A Quick Overview<\/span><\/span><\/h2>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p><\/amp-story-grid-layer><\/amp-story-page><amp-story-page id=\"881c1680-f6c7-4e2a-a639-216d468bb84c\" auto-advance-after=\"7s\"><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-3ced78dc-1709-444e-ac5c-e07830ba73ac\",\"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-c18c7343-40fd-4d38-aef1-c9c9d5c91bb8\",\"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-b740e501-4ade-44e0-9093-d0af76939492 [data-leaf-element=\\\"true\\\"]\",\"keyframes\":{\"transform\":[\"translate(25%, 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-1997fa52-84a5-4481-95c7-c597f913cca7\",\"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-5159a0fb-8a2c-420c-acc3-e82b4edc028a\",\"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-b740e501-4ade-44e0-9093-d0af76939492\" 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-f3a5f63f-1458-48b0-b7b5-9f254acd553f\">\n<div style=\"position:absolute;width:118.51852%;height:100%;left:0%;top:0%\" data-leaf-element=\"true\"><amp-img layout=\"fill\" src=\"https:\/\/images.unsplash.com\/photo-1631624210938-539575f92e3c?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxfHxkZXZvcHN8ZW58MHx8fHwxNjYyNjMwODM1&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=MnwxMzcxOTN8MHwxfHNlYXJjaHwxfHxkZXZvcHN8ZW58MHx8fHwxNjYyNjMwODM1&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=MnwxMzcxOTN8MHwxfHNlYXJjaHwxfHxkZXZvcHN8ZW58MHx8fHwxNjYyNjMwODM1&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=MnwxMzcxOTN8MHwxfHNlYXJjaHwxfHxkZXZvcHN8ZW58MHx8fHwxNjYyNjMwODM1&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=MnwxMzcxOTN8MHwxfHNlYXJjaHwxfHxkZXZvcHN8ZW58MHx8fHwxNjYyNjMwODM1&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=MnwxMzcxOTN8MHwxfHNlYXJjaHwxfHxkZXZvcHN8ZW58MHx8fHwxNjYyNjMwODM1&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=MnwxMzcxOTN8MHwxfHNlYXJjaHwxfHxkZXZvcHN8ZW58MHx8fHwxNjYyNjMwODM1&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:9.2233%;top:40.45307%;width:79.36893%;height:17.1521%;transform:rotate(360deg);opacity:1\">\n<div id=\"anim-3ced78dc-1709-444e-ac5c-e07830ba73ac\" 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-c18c7343-40fd-4d38-aef1-c9c9d5c91bb8\" 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.6116207951070336% 0.6116207951070336% 0.6116207951070336% 0.6116207951070336% \/ 1.8867924528301887% 1.8867924528301887% 1.8867924528301887% 1.8867924528301887%\" id=\"el-a9b062b0-2d85-4283-90de-abebe426d93e\">\n<h2 id=\"given-a-string-find-the-length-of-the-longest-substring-without-repeating-characters\" class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:0.6678899082568811% 0;font-family:&quot;Darker Grotesque&quot;,sans-serif;font-size:0.453074em;line-height:1.2;text-align:left;padding:0;color:#000000\"><span><span style=\"color: #fff\">Given a string, find the length of the longest substring without repeating characters.<\/span><\/span><\/h2>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\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-e64b8ab6-68f8-4509-a5cb-63718f86f4b8\">\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.2233%;top:27.50809%;width:84.95146%;height:9.87055%;opacity:1\">\n<div id=\"anim-1997fa52-84a5-4481-95c7-c597f913cca7\" 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-5159a0fb-8a2c-420c-acc3-e82b4edc028a\" 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.5714285714285714% 0.5714285714285714% 0.5714285714285714% 0.5714285714285714% \/ 3.278688524590164% 3.278688524590164% 3.278688524590164% 3.278688524590164%\" id=\"el-8b0e7f2d-4f9f-4095-9af1-92f32be86168\">\n<h1 id=\"problem-statement\" class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:2.931428571428572% 0;font-family:&quot;Darker Grotesque&quot;,sans-serif;font-size:0.728155em;line-height:0.9;text-align:left;padding:0;color:#000000\"><span><span style=\"font-weight: 700; color: #e06e04\">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\/Banner-1-1.png\"><a href=\"https:\/\/www.interviewbit.com\/blog\/longest-substring-without-repeating-characters\/?utm_source=Ib&amp;utm_medium=longest-substring-without-repeating-characters&amp;utm_campaign=webstories\" rel=\"\">Read more<\/a><\/amp-story-page-outlink><\/amp-story-page><amp-story-page id=\"277173cc-5715-49f8-a52a-cc1d7614dffc\" auto-advance-after=\"7s\"><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-83d5360c-f454-438a-9eef-98b631379f27\",\"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-7dc84b18-422a-4705-86ef-0ac030ca823e\",\"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-e8953785-83df-4c89-8a5c-411168945240 [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-1222cc81-9c2b-4054-bc8e-184c796917df\",\"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-c17bc066-60b6-45a8-806f-29e5cdd4127d\",\"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-e8953785-83df-4c89-8a5c-411168945240\" 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-dc9776bd-a5e5-41cc-9160-89bf8e196164\">\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-1573164574572-cb89e39749b4?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxMHx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY2NjYyMzI3MA&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=6016&amp;h=4016&amp;fit=max\" alt=\"group of people sitting beside rectangular wooden table with laptops\" srcSet=\"https:\/\/images.unsplash.com\/photo-1573164574572-cb89e39749b4?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxMHx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY2NjYyMzI3MA&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=6016&amp;h=4016&amp;fit=max 6016w,https:\/\/images.unsplash.com\/photo-1573164574572-cb89e39749b4?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxMHx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY2NjYyMzI3MA&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=4812&amp;h=3212&amp;fit=max 4812w,https:\/\/images.unsplash.com\/photo-1573164574572-cb89e39749b4?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxMHx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY2NjYyMzI3MA&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=3609&amp;h=2409&amp;fit=max 3609w,https:\/\/images.unsplash.com\/photo-1573164574572-cb89e39749b4?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxMHx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY2NjYyMzI3MA&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=2406&amp;h=1606&amp;fit=max 2406w,https:\/\/images.unsplash.com\/photo-1573164574572-cb89e39749b4?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxMHx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY2NjYyMzI3MA&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=1203&amp;h=803&amp;fit=max 1203w,https:\/\/images.unsplash.com\/photo-1573164574572-cb89e39749b4?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxMHx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY2NjYyMzI3MA&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.55)\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"page-background-overlay-area\" style=\"background-color:rgba(0,0,0,0.55)\"><\/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:7.76699%;top:36.8932%;width:84.46602%;height:33.17152%;opacity:1\">\n<div id=\"anim-83d5360c-f454-438a-9eef-98b631379f27\" 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-7dc84b18-422a-4705-86ef-0ac030ca823e\" 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.5747126436781609% 0.5747126436781609% 0.5747126436781609% 0.5747126436781609% \/ 0.975609756097561% 0.975609756097561% 0.975609756097561% 0.975609756097561%\" id=\"el-10a12e2a-8a3d-47a0-bb92-294a0c6e9cff\">\n<h2 id=\"input-s-abcabcbb-output-3-explanation-abc-is-the-longest-substring-without-repeating-characters-among-all-the-substrings\" class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:0.627586206896552% 0;font-family:&quot;Darker Grotesque&quot;,sans-serif;font-size:0.453074em;line-height:1.2;text-align:left;padding:0;color:#000000\"><span><span style=\"font-weight: 700; color: #fff\">Input:<\/span><span style=\"color: #fff\"> S = \u201cabcabcbb\u201d&nbsp;<\/span><br \/>\n<span style=\"font-weight: 700; color: #fff\">Output: <\/span><span style=\"color: #fff\">3&nbsp;<\/span><br \/>\n<span style=\"font-weight: 700; color: #fff\">Explanation: <\/span><span style=\"color: #fff\">\u201cabc\u201d is the longest substring without repeating characters among all the substrings.<\/span><\/span><\/h2>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\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-272f6859-b105-49e3-ad7b-f45fd2aa76ca\">\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:22.97735%;width:88.83495%;height:9.87055%;opacity:1\">\n<div id=\"anim-1222cc81-9c2b-4054-bc8e-184c796917df\" 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-c17bc066-60b6-45a8-806f-29e5cdd4127d\" 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.546448087431694% 0.546448087431694% 0.546448087431694% 0.546448087431694% \/ 3.278688524590164% 3.278688524590164% 3.278688524590164% 3.278688524590164%\" id=\"el-8bbb9b93-ca19-41f3-aed7-8b4b675e14b9\">\n<h1 id=\"examples\" class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:2.8032786885245904% 0;font-family:&quot;Darker Grotesque&quot;,sans-serif;font-size:0.728155em;line-height:0.9;text-align:left;padding:0;color:#000000\"><span><span style=\"font-weight: 700; color: #e06e04\">Examples<\/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\/Banner-1-1.png\"><a href=\"https:\/\/www.interviewbit.com\/blog\/longest-substring-without-repeating-characters\/?utm_source=Ib&amp;utm_medium=longest-substring-without-repeating-characters&amp;utm_campaign=webstories\" rel=\"\">Check more examples<\/a><\/amp-story-page-outlink><\/amp-story-page><amp-story-page id=\"bc60c57e-a103-4417-900c-bd0d04f53aef\" auto-advance-after=\"7s\"><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-8b548515-ffea-4dcd-a1ba-8f74b27ee4f0\",\"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-7e5cfebf-b057-46b0-9a22-25aa43d7d66f\",\"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-93f60b9c-889f-4e19-99be-d792fa35499b [data-leaf-element=\\\"true\\\"]\",\"keyframes\":{\"transform\":[\"translate(25%, 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-d98762db-f3c7-45e3-9399-9146d8df15ef\",\"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-7b7e79de-835f-401b-b860-9ac32fddbebe\",\"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-93f60b9c-889f-4e19-99be-d792fa35499b\" 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-15fc455c-8aec-405d-9b72-81ecfc9f4aef\">\n<div style=\"position:absolute;width:118.51852%;height:100%;left:0%;top:0%\" data-leaf-element=\"true\"><amp-img layout=\"fill\" src=\"https:\/\/images.unsplash.com\/photo-1631624210938-539575f92e3c?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxfHxkZXZvcHN8ZW58MHx8fHwxNjYyNjMwODM1&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=MnwxMzcxOTN8MHwxfHNlYXJjaHwxfHxkZXZvcHN8ZW58MHx8fHwxNjYyNjMwODM1&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=MnwxMzcxOTN8MHwxfHNlYXJjaHwxfHxkZXZvcHN8ZW58MHx8fHwxNjYyNjMwODM1&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=MnwxMzcxOTN8MHwxfHNlYXJjaHwxfHxkZXZvcHN8ZW58MHx8fHwxNjYyNjMwODM1&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=MnwxMzcxOTN8MHwxfHNlYXJjaHwxfHxkZXZvcHN8ZW58MHx8fHwxNjYyNjMwODM1&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=MnwxMzcxOTN8MHwxfHNlYXJjaHwxfHxkZXZvcHN8ZW58MHx8fHwxNjYyNjMwODM1&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=MnwxMzcxOTN8MHwxfHNlYXJjaHwxfHxkZXZvcHN8ZW58MHx8fHwxNjYyNjMwODM1&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:8.73786%;top:36.56958%;width:83.00971%;height:44.01294%;opacity:1\">\n<div id=\"anim-8b548515-ffea-4dcd-a1ba-8f74b27ee4f0\" 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-7e5cfebf-b057-46b0-9a22-25aa43d7d66f\" 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.5847953216374269% 0.5847953216374269% 0.5847953216374269% 0.5847953216374269% \/ 0.7352941176470588% 0.7352941176470588% 0.7352941176470588% 0.7352941176470588%\" id=\"el-84ea2df9-ceff-472a-bac3-cf281b1ff14a\">\n<h2 id=\"1-generate-all-substrings-of-the-given-string-2-check-if-the-substring-has-all-unique-characters-3-return-the-max-length-of-substrings-with-unique-characters\" class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:0.6385964912280705% 0;font-family:&quot;Darker Grotesque&quot;,sans-serif;font-size:0.453074em;line-height:1.2;text-align:left;padding:0;color:#000000\"><span><span style=\"color: #fff\">1. Generate all substrings of the given string.<\/span><\/p>\n<p><span style=\"color: #fff\">2. Check if the substring has all unique characters.<\/span><\/p>\n<p><span style=\"color: #fff\">3. Return the max length of substrings with unique characters<\/span><\/span><\/h2>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\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-d8513910-8a83-4deb-b566-2db31069c93c\">\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:18.12298%;width:86.16505%;height:16.50485%;opacity:1\">\n<div id=\"anim-d98762db-f3c7-45e3-9399-9146d8df15ef\" 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-7b7e79de-835f-401b-b860-9ac32fddbebe\" 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.5633802816901409% 0.5633802816901409% 0.5633802816901409% 0.5633802816901409% \/ 1.9607843137254901% 1.9607843137254901% 1.9607843137254901% 1.9607843137254901%\" id=\"el-cdb5f77b-5dcc-404e-a030-49efdee30598\">\n<h1 id=\"bruteforce-approach\" class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:2.890140845070423% 0;font-family:&quot;Darker Grotesque&quot;,sans-serif;font-size:0.728155em;line-height:0.9;text-align:left;padding:0;color:#000000\"><span><span style=\"font-weight: 700; color: #e06e04\">Bruteforce 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\/Banner-1-1.png\"><a href=\"https:\/\/www.interviewbit.com\/blog\/longest-substring-without-repeating-characters\/?utm_source=Ib&amp;utm_medium=longest-substring-without-repeating-characters&amp;utm_campaign=webstories\" rel=\"\">Check its algorithm<\/a><\/amp-story-page-outlink><\/amp-story-page><amp-story-page id=\"1a191061-ddbb-4550-abcf-f0bc85dc7287\" auto-advance-after=\"7s\"><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-4c2f042a-081c-4651-ba16-05e46bd2f07d\",\"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-c7f031d9-f4e5-4624-aa9e-97ada12eb240\",\"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-171033c7-8812-4866-8d26-900e1ebd02c1 [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-171033c7-8812-4866-8d26-900e1ebd02c1\" 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-883223f5-830e-4ae0-9120-2707c519df5d\">\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-1612914033131-2fbd331a3806?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw1OHx8ZGF0YSUyMGFuYWx5dGljc3xlbnwwfHx8fDE2NjM3NTgzMDc&amp;ixlib=rb-1.2.1&amp;fm=jpg&amp;w=4000&amp;h=6000&amp;fit=max\" alt=\"Weather Reporting System using IoT\" srcSet=\"https:\/\/images.unsplash.com\/photo-1612914033131-2fbd331a3806?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw1OHx8ZGF0YSUyMGFuYWx5dGljc3xlbnwwfHx8fDE2NjM3NTgzMDc&amp;ixlib=rb-1.2.1&amp;fm=jpg&amp;w=4000&amp;h=6000&amp;fit=max 4000w,https:\/\/images.unsplash.com\/photo-1612914033131-2fbd331a3806?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw1OHx8ZGF0YSUyMGFuYWx5dGljc3xlbnwwfHx8fDE2NjM3NTgzMDc&amp;ixlib=rb-1.2.1&amp;fm=jpg&amp;w=3200&amp;h=4800&amp;fit=max 3200w,https:\/\/images.unsplash.com\/photo-1612914033131-2fbd331a3806?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw1OHx8ZGF0YSUyMGFuYWx5dGljc3xlbnwwfHx8fDE2NjM3NTgzMDc&amp;ixlib=rb-1.2.1&amp;fm=jpg&amp;w=2400&amp;h=3600&amp;fit=max 2400w,https:\/\/images.unsplash.com\/photo-1612914033131-2fbd331a3806?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw1OHx8ZGF0YSUyMGFuYWx5dGljc3xlbnwwfHx8fDE2NjM3NTgzMDc&amp;ixlib=rb-1.2.1&amp;fm=jpg&amp;w=1600&amp;h=2400&amp;fit=max 1600w,https:\/\/images.unsplash.com\/photo-1612914033131-2fbd331a3806?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw1OHx8ZGF0YSUyMGFuYWx5dGljc3xlbnwwfHx8fDE2NjM3NTgzMDc&amp;ixlib=rb-1.2.1&amp;fm=jpg&amp;w=800&amp;h=1200&amp;fit=max 800w,https:\/\/images.unsplash.com\/photo-1612914033131-2fbd331a3806?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw1OHx8ZGF0YSUyMGFuYWx5dGljc3xlbnwwfHx8fDE2NjM3NTgzMDc&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-1f5f27f4-5dfe-431a-a50f-d7d2f6a3195f\">\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.49515%;top:33.17152%;width:83.00971%;height:38.83495%;opacity:1\">\n<div id=\"anim-4c2f042a-081c-4651-ba16-05e46bd2f07d\" 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-c7f031d9-f4e5-4624-aa9e-97ada12eb240\" 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.5847953216374269% 0.5847953216374269% 0.5847953216374269% 0.5847953216374269% \/ 0.8333333333333334% 0.8333333333333334% 0.8333333333333334% 0.8333333333333334%\" id=\"el-28317bd2-7ada-4b27-9743-f83433cd9a66\">\n<h2 id=\"time-complexity-on3-where-n-is-string-length-space-complexity-ominn-m-as-hashset-is-used-n-is-the-string-length-and-m-is-the-size-of-the-substring\" class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:0.6385964912280705% 0;font-family:&quot;Darker Grotesque&quot;,sans-serif;font-size:0.453074em;line-height:1.2;text-align:left;padding:0;color:#000000\"><span><span style=\"font-weight: 700; color: #e06e04\">Time Complexity: <\/span><span style=\"color: #fff\">O(N^3), where N is string length&nbsp;<\/span><\/p>\n<p><span style=\"font-weight: 700; color: #e06e04\">Space Complexity: <\/span><span style=\"color: #fff\">O(min(N, M)), as HashSet is used. N is the string length, and M is the size of the substring.<\/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\/Banner-1-1.png\"><a href=\"https:\/\/www.interviewbit.com\/blog\/longest-substring-without-repeating-characters\/?utm_source=Ib&amp;utm_medium=longest-substring-without-repeating-characters&amp;utm_campaign=webstories\" rel=\"\">Read more<\/a><\/amp-story-page-outlink><\/amp-story-page><amp-story-page id=\"bbc58edc-f0c3-4d1d-8c2e-0d48cf8bda69\" auto-advance-after=\"7s\"><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-d356d71c-0784-4cf7-aeca-94afab1c118a\",\"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-43619832-38e0-418d-a716-5db46e675a31\",\"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-9b2347c5-8007-417f-9c1c-7dcd66c1a71a\",\"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-b16e7639-99c6-4da4-afa1-b9f121e38788\",\"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-3bba62c0-9a83-4089-929d-26dd01506919 [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:#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-3bba62c0-9a83-4089-929d-26dd01506919\" 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-998a0474-d77b-4894-aa13-0655967a53c6\">\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-1573164713350-b14a82d3c15b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw1NXx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjcxNTM2Nzkz&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=4016&amp;h=6016&amp;fit=max\" alt=\"woman in red and black jacket holding laptop\" srcSet=\"https:\/\/images.unsplash.com\/photo-1573164713350-b14a82d3c15b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw1NXx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjcxNTM2Nzkz&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=4016&amp;h=6016&amp;fit=max 4016w,https:\/\/images.unsplash.com\/photo-1573164713350-b14a82d3c15b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw1NXx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjcxNTM2Nzkz&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=3212&amp;h=4812&amp;fit=max 3212w,https:\/\/images.unsplash.com\/photo-1573164713350-b14a82d3c15b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw1NXx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjcxNTM2Nzkz&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=2409&amp;h=3609&amp;fit=max 2409w,https:\/\/images.unsplash.com\/photo-1573164713350-b14a82d3c15b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw1NXx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjcxNTM2Nzkz&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=1606&amp;h=2406&amp;fit=max 1606w,https:\/\/images.unsplash.com\/photo-1573164713350-b14a82d3c15b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw1NXx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjcxNTM2Nzkz&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=803&amp;h=1203&amp;fit=max 803w,https:\/\/images.unsplash.com\/photo-1573164713350-b14a82d3c15b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw1NXx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjcxNTM2Nzkz&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-673d7e25-2b23-41fd-b965-31c082b0b9df\">\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.2233%;top:38.99676%;width:83.00971%;height:33.17152%;opacity:1\">\n<div id=\"anim-d356d71c-0784-4cf7-aeca-94afab1c118a\" 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-43619832-38e0-418d-a716-5db46e675a31\" 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.5847953216374269% 0.5847953216374269% 0.5847953216374269% 0.5847953216374269% \/ 0.975609756097561% 0.975609756097561% 0.975609756097561% 0.975609756097561%\" id=\"el-1372ae18-bf87-4a00-b7fe-30934715daf8\">\n<h2 id=\"it-only-checks-if-the-new-character-added-to-the-substring-is-a-duplicate-rather-than-checking-all-substrings-for-duplicates-this-avoids-repeating-tasks-and-increases-efficiency\" class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:0.6385964912280705% 0;font-family:&quot;Darker Grotesque&quot;,sans-serif;font-size:0.453074em;line-height:1.2;text-align:left;padding:0;color:#000000\"><span><span style=\"color: #fff\">It only checks if the new character added to the substring is a duplicate rather than checking all substrings for duplicates. This avoids repeating tasks and increases efficiency.<\/span><\/span><\/h2>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div style=\"position:absolute;pointer-events:none;left:8.98058%;top:19.90291%;width:86.16505%;height:16.50485%;opacity:1\">\n<div id=\"anim-9b2347c5-8007-417f-9c1c-7dcd66c1a71a\" 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-b16e7639-99c6-4da4-afa1-b9f121e38788\" 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.5633802816901409% 0.5633802816901409% 0.5633802816901409% 0.5633802816901409% \/ 1.9607843137254901% 1.9607843137254901% 1.9607843137254901% 1.9607843137254901%\" id=\"el-8f683ba0-d5e2-43fb-a9de-fcc3bc7cf9c7\">\n<h1 id=\"sliding-window-approach\" class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:2.890140845070423% 0;font-family:&quot;Darker Grotesque&quot;,sans-serif;font-size:0.728155em;line-height:0.9;text-align:left;padding:0;color:#000000\"><span><span style=\"font-weight: 700; color: #e06e04\">Sliding Window 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\/Banner-1-1.png\"><a href=\"https:\/\/www.interviewbit.com\/blog\/longest-substring-without-repeating-characters\/?utm_source=Ib&amp;utm_medium=longest-substring-without-repeating-characters&amp;utm_campaign=webstories\" rel=\"\">Check its algorithm<\/a><\/amp-story-page-outlink><\/amp-story-page><amp-story-page id=\"c9a3f5ad-0353-457a-8fa5-358a3930d76f\" auto-advance-after=\"7s\"><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-3f658398-37fe-4990-b04b-96eb94cdd9cf\",\"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-8cc9af43-9403-40c1-9999-f2028359a13f\",\"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-6428eec0-2988-4e69-beac-d20cc22ab224 [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:#f3d9d9\">\n<div class=\"page-safe-area\">\n<div style=\"position:absolute;pointer-events:none;left:0;top:-9.25926%;width:100%;height:118.51852%;opacity:1\">\n<div id=\"anim-6428eec0-2988-4e69-beac-d20cc22ab224\" 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-998a0474-d77b-4894-aa13-0655967a53c6\">\n<div style=\"position:absolute;width:118.57814%;height:100%;left:-9.28907%;top:0%\" data-leaf-element=\"true\"><amp-img layout=\"fill\" src=\"https:\/\/images.unsplash.com\/photo-1581087724844-037b13e16b0b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw5Nnx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjcxNTM2ODUy&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=6630&amp;h=9940&amp;fit=max\" alt=\"woman in black shirt using computer\" srcSet=\"https:\/\/images.unsplash.com\/photo-1581087724844-037b13e16b0b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw5Nnx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjcxNTM2ODUy&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=6630&amp;h=9940&amp;fit=max 6630w,https:\/\/images.unsplash.com\/photo-1581087724844-037b13e16b0b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw5Nnx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjcxNTM2ODUy&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=5304&amp;h=7952&amp;fit=max 5304w,https:\/\/images.unsplash.com\/photo-1581087724844-037b13e16b0b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw5Nnx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjcxNTM2ODUy&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=3978&amp;h=5964&amp;fit=max 3978w,https:\/\/images.unsplash.com\/photo-1581087724844-037b13e16b0b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw5Nnx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjcxNTM2ODUy&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=2652&amp;h=3976&amp;fit=max 2652w,https:\/\/images.unsplash.com\/photo-1581087724844-037b13e16b0b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw5Nnx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjcxNTM2ODUy&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=1326&amp;h=1988&amp;fit=max 1326w,https:\/\/images.unsplash.com\/photo-1581087724844-037b13e16b0b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw5Nnx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjcxNTM2ODUy&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=340&amp;h=510&amp;fit=max 340w\" sizes=\"(min-width: 1024px) 53vh, 119vw\" disable-inline-width=\"true\"><\/amp-img><\/div>\n<div class=\"element-overlay-area\" style=\"background-color:rgba(0,0,0,0.5)\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"page-background-overlay-area\" style=\"background-color:rgba(0,0,0,0.5)\"><\/div>\n<\/div>\n<\/div>\n<p><\/amp-story-grid-layer><amp-story-grid-layer template=\"vertical\" aspect-ratio=\"412:618\" class=\"grid-layer\"><\/p>\n<div class=\"page-fullbleed-area\">\n<div class=\"page-safe-area\">\n<div style=\"position:absolute;pointer-events:none;left:0;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-835a0d5a-5680-4139-a64b-b9a18c397e8e\">\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.2233%;top:30.74434%;width:83.00971%;height:38.83495%;opacity:1\">\n<div id=\"anim-3f658398-37fe-4990-b04b-96eb94cdd9cf\" 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-8cc9af43-9403-40c1-9999-f2028359a13f\" 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.5847953216374269% 0.5847953216374269% 0.5847953216374269% 0.5847953216374269% \/ 0.8333333333333334% 0.8333333333333334% 0.8333333333333334% 0.8333333333333334%\" id=\"el-289bfc4d-8123-4640-93b9-66fd5dab08f4\">\n<h2 id=\"time-complexity-on2-where-n-is-string-length-space-complexity-ominn-m-as-hashset-is-used-n-is-the-string-length-and-m-is-the-size-of-the-substring\" class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:0.6385964912280705% 0;font-family:&quot;Darker Grotesque&quot;,sans-serif;font-size:0.453074em;line-height:1.2;text-align:left;padding:0;color:#000000\"><span><span style=\"font-weight: 700; color: #e06e04\">Time Complexity: <\/span><span style=\"color: #fff\">O(N^2), where N is string length&nbsp;<\/span><\/p>\n<p><span style=\"font-weight: 700; color: #e06e04\">Space Complexity: <\/span><span style=\"color: #fff\">O(min(N, M)), as HashSet is used. N is the string length, and M is the size of the substring.<\/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\/Banner-1-1.png\"><a href=\"https:\/\/www.interviewbit.com\/blog\/longest-substring-without-repeating-characters\/?utm_source=Ib&amp;utm_medium=longest-substring-without-repeating-characters&amp;utm_campaign=webstories\" rel=\"\">Read More<\/a><\/amp-story-page-outlink><\/amp-story-page><amp-story-page id=\"b2cd7624-c3ec-4a7d-9867-d7d4dc8f0933\" auto-advance-after=\"7s\"><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-4de8e4ba-68f6-4aca-b00b-35678d506e62\",\"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-daa38fc0-4a39-4384-9ec2-996e43c31166\",\"keyframes\":{\"transform\":[\"translate3d(0px, 164.10872%, 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-2c62fb43-da63-43ea-8ff2-55c7217af53a [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:#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-2c62fb43-da63-43ea-8ff2-55c7217af53a\" 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-ae3f6c5c-5c72-4ba8-b6bc-e71174f9ed50\">\n<div style=\"position:absolute;width:142.20546%;height:100%;left:-21.10273%;top:0%\" data-leaf-element=\"true\"><amp-img layout=\"fill\" src=\"https:\/\/images.unsplash.com\/photo-1579403124614-197f69d8187b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw4fHxqYXZhfGVufDB8fHx8MTY2NjI1MTk3NQ&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=3394&amp;h=4243&amp;fit=max\" alt=\"media\/unsplash:QUHuwyNgSA0\" srcSet=\"https:\/\/images.unsplash.com\/photo-1579403124614-197f69d8187b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw4fHxqYXZhfGVufDB8fHx8MTY2NjI1MTk3NQ&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=3394&amp;h=4243&amp;fit=max 3394w,https:\/\/images.unsplash.com\/photo-1579403124614-197f69d8187b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw4fHxqYXZhfGVufDB8fHx8MTY2NjI1MTk3NQ&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=2715&amp;h=3394&amp;fit=max 2715w,https:\/\/images.unsplash.com\/photo-1579403124614-197f69d8187b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw4fHxqYXZhfGVufDB8fHx8MTY2NjI1MTk3NQ&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=2036&amp;h=2545&amp;fit=max 2036w,https:\/\/images.unsplash.com\/photo-1579403124614-197f69d8187b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw4fHxqYXZhfGVufDB8fHx8MTY2NjI1MTk3NQ&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=1357&amp;h=1696&amp;fit=max 1357w,https:\/\/images.unsplash.com\/photo-1579403124614-197f69d8187b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw4fHxqYXZhfGVufDB8fHx8MTY2NjI1MTk3NQ&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=678&amp;h=848&amp;fit=max 678w,https:\/\/images.unsplash.com\/photo-1579403124614-197f69d8187b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw4fHxqYXZhfGVufDB8fHx8MTY2NjI1MTk3NQ&amp;ixlib=rb-4.0.3&amp;fm=jpg&amp;w=340&amp;h=425&amp;fit=max 340w\" sizes=\"(min-width: 1024px) 64vh, 142vw\" 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:7.52427%;top:35.43689%;width:84.46602%;height:44.98382%;opacity:1\">\n<div id=\"anim-4de8e4ba-68f6-4aca-b00b-35678d506e62\" 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-daa38fc0-4a39-4384-9ec2-996e43c31166\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0;--initial-opacity:1;--initial-transform:translate3d(0px, 164.10872%, 0)\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0\" id=\"el-021e0541-35be-4946-80af-40b0a2d780a0\">\n<h2 id=\"explore-different-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.6233808144755748% 0;font-family:&quot;Anton&quot;,sans-serif;font-size:0.598706em;line-height:1.2;text-align:left;padding:0;color:#000000\"><span><span style=\"color: #faf4ea\">Explore different 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: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-d8431b7e-175f-447d-8b3d-3fc64bb112fd\">\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>\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\/Banner-1-1.png\"><a href=\"https:\/\/www.interviewbit.com\/blog\/longest-substring-without-repeating-characters\/?utm_source=Ib&amp;utm_medium=longest-substring-without-repeating-characters&amp;utm_campaign=webstories\" rel=\"\">Explore now<\/a><\/amp-story-page-outlink><\/amp-story-page><\/amp-story><\/body><\/html><\/p>\n","protected":false},"excerpt":{"rendered":"This web story will give you a thorough understanding of  how to find longest Substring Without Repeating Characters and show you how to implement different approaches in various programming languages\n","protected":false},"author":21,"featured_media":15185,"template":"","meta":{"_daextam_enable_autolinks":"","web_stories_products":[],"web_stories_publisher_logo":1082,"web_stories_poster":[]},"web_story_category":[1944],"web_story_tag":[2165],"amp_enabled":false,"story_data":{"version":43,"pages":[{"elements":[{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"x":48,"y":0,"width":330,"height":494,"mask":{"type":"rectangle"},"isBackground":true,"type":"image","id":"22ae990b-24ec-4f61-9792-67850d36d3d5","basedOn":"11ef0ff2-7ece-45b6-b2ff-64736e54ce84","scale":100,"focalX":50,"focalY":50,"resource":{"baseColor":"#c0c0c0","blurHash":"LOE2@8t7%g-;~WoftS%MWUWAozoz","type":"image","mimeType":"image\/jpeg","creationDate":"2018-03-22T16:56:54Z","src":"https:\/\/images.unsplash.com\/photo-1521737711867-e3b97375f902?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxNHx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY2NjYyMzI3MA&ixlib=rb-4.0.3&fm=jpg&w=5304&h=7952&fit=max","width":5304,"height":7952,"id":"media\/unsplash:MChSQHxGZrQ","alt":"men sitting in front of their laptop computer","sizes":{"full":{"file":"media\/unsplash:MChSQHxGZrQ","sourceUrl":"https:\/\/images.unsplash.com\/photo-1521737711867-e3b97375f902?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxNHx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY2NjYyMzI3MA&ixlib=rb-4.0.3&fm=jpg&w=5304&h=7952&fit=max","mimeType":"image\/jpeg","width":5304,"height":7952},"large":{"file":"media\/unsplash:MChSQHxGZrQ","sourceUrl":"https:\/\/images.unsplash.com\/photo-1521737711867-e3b97375f902?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxNHx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY2NjYyMzI3MA&ixlib=rb-4.0.3&fm=jpg&w=4243&h=6361&fit=max","mimeType":"image\/jpeg","width":4243,"height":6361},"3182_4771":{"file":"media\/unsplash:MChSQHxGZrQ","sourceUrl":"https:\/\/images.unsplash.com\/photo-1521737711867-e3b97375f902?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxNHx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY2NjYyMzI3MA&ixlib=rb-4.0.3&fm=jpg&w=3182&h=4771&fit=max","mimeType":"image\/jpeg","width":3182,"height":4771},"2121_3180":{"file":"media\/unsplash:MChSQHxGZrQ","sourceUrl":"https:\/\/images.unsplash.com\/photo-1521737711867-e3b97375f902?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxNHx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY2NjYyMzI3MA&ixlib=rb-4.0.3&fm=jpg&w=2121&h=3180&fit=max","mimeType":"image\/jpeg","width":2121,"height":3180},"1060_1589":{"file":"media\/unsplash:MChSQHxGZrQ","sourceUrl":"https:\/\/images.unsplash.com\/photo-1521737711867-e3b97375f902?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxNHx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY2NjYyMzI3MA&ixlib=rb-4.0.3&fm=jpg&w=1060&h=1589&fit=max","mimeType":"image\/jpeg","width":1060,"height":1589},"web_stories_thumbnail":{"file":"media\/unsplash:MChSQHxGZrQ","sourceUrl":"https:\/\/images.unsplash.com\/photo-1521737711867-e3b97375f902?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxNHx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY2NjYyMzI3MA&ixlib=rb-4.0.3&fm=jpg&w=340&h=510&fit=max","mimeType":"image\/jpeg","width":340,"height":510}},"attribution":{"author":{"displayName":"Annie Spratt","url":"https:\/\/unsplash.com\/@anniespratt?utm_source=web_stories_wordpress&utm_medium=referral"},"registerUsageUrl":"https:\/\/media3p.googleapis.com\/v1\/media:registerUsage?token=AQBR4tr5BHUbdr0mvjz3wowBWY3KP13dOC%2BQH2LiFdZtXoVyYFETlCX4x2BuqV6LTha5uJOgB1IlVY0WUHQQKUUiE0j72\/HIdtxT28%2BY6fvUaprTDWs2K9vTPPrXfvt\/%2Bf8DFInZjYGnKn6FFlAa2fmsG1Ydv3chwiS9\/4T7f06ljt2N17keEw28QdGPn3exEBwIeB21ikvZsxbvlSZB4x\/YLL7VUAec00%2BZnLdAfnLQEpn1lDQPgO4i5dNqdIjqAcE3J4nM"},"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,"x":0,"y":-39,"width":180,"height":60,"mask":{"type":"rectangle"},"type":"image","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},"basedOn":"bcc685a3-50e0-4220-aa2d-37d04255b533","id":"84a9fe46-f171-471f-bb69-fb55fff093d6"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"NONE","font":{"family":"Merriweather","fallbacks":["serif"],"weights":[300,400,700,900],"styles":["italic","regular"],"variants":[[0,300],[1,300],[0,400],[1,400],[0,700],[1,700],[0,900],[1,900]],"service":"fonts.google.com","metrics":{"upm":1000,"asc":984,"des":-273,"tAsc":984,"tDes":-273,"tLGap":0,"wAsc":1065,"wDes":273,"xH":555,"capH":743,"yMin":-272,"yMax":1055,"hAsc":984,"hDes":-273,"lGap":0}},"fontSize":36,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":1.19,"textAlign":"left","padding":{"locked":true,"hasHiddenPadding":false,"horizontal":0,"vertical":0},"type":"text","content":"<span style=\"color: #fff\">Find the Longest Substring Without Repeating Characters<\/span>","borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"x":15,"y":369,"width":456,"height":132,"scale":100,"focalX":50,"focalY":50,"id":"5a03f828-20ca-4b52-b11f-7a23ec19dee9"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":false,"scale":100,"focalX":50,"focalY":50,"resource":{"baseColor":"#74bcec","type":"image","mimeType":"image\/gif","creationDate":"2020-04-09T12:51:28Z","src":"https:\/\/media.tenor.com\/cgriPG-ob9QAAAAi\/fl%C3%A8che-arrow.gif","width":498,"height":133,"id":"media\/tenor:8217629219290116052","alt":"Fl\u00e8che Arrow Sticker","sizes":{"full":{"file":"media\/tenor:8217629219290116052","sourceUrl":"https:\/\/media.tenor.com\/cgriPG-ob9QAAAAi\/fl%C3%A8che-arrow.gif","mimeType":"image\/gif","width":498,"height":133},"large":{"file":"media\/tenor:8217629219290116052","sourceUrl":"https:\/\/c.tenor.com\/cgriPG-ob9QAAAAq\/tenor.gif","mimeType":"image\/gif","width":498,"height":133},"200_53":{"file":"media\/tenor:8217629219290116052","sourceUrl":"https:\/\/media.tenor.com\/cgriPG-ob9QAAAAj\/fl%C3%A8che-arrow.gif","mimeType":"image\/gif","width":200,"height":53},"web_stories_thumbnail":{"file":"media\/tenor:8217629219290116052","sourceUrl":"https:\/\/media.tenor.com\/cgriPG-ob9QAAAAk\/fl%C3%A8che-arrow.gif","mimeType":"image\/gif","width":90,"height":24}},"attribution":{"author":{"displayName":"simkone","url":"https:\/\/tenor.com\/users\/simkone"},"registerUsageUrl":"https:\/\/media3p.googleapis.com\/v1\/media:registerUsage?token=AQBR4tqdh\/dp%2BkeorDPjx8rcHNGXRhl5GjmLVCkfZ3b1B0r1IDYnKLwoHuiL\/7gztUZ4Q3woWyZxNVQltIJfaYh\/q0q0Dg%3D%3D"},"isPlaceholder":false,"isOptimized":false,"isMuted":false,"isExternal":true,"needsProxy":false},"type":"image","x":41,"y":570,"width":330,"height":82,"mask":{"type":"rectangle","showInLibrary":true,"name":"Rectangle","path":"M 0,0 1,0 1,1 0,1 0,0 Z","ratio":1,"supportsBorder":true},"id":"6f338729-862c-4acf-9ed6-e37e14299c8a"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":360,"lockAspectRatio":true,"backgroundTextMode":"NONE","font":{"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}},"fontSize":30,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":1.2,"textAlign":"left","padding":{"locked":true,"hasHiddenPadding":false,"horizontal":0,"vertical":0},"type":"text","content":"<span style=\"color: #e06e04\">A Quick Overview<\/span>","borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"x":15,"y":509,"width":302,"height":35,"scale":100,"focalX":50,"focalY":50,"id":"37afe416-c675-4414-bdbf-55c1747bd284"}],"animations":[],"backgroundOverlay":"none","backgroundColor":{"color":{"r":18,"g":32,"b":54}},"type":"page","id":"2ba48566-4303-4648-be14-d8b890969253","pageTemplateType":"section","groups":[],"defaultBackgroundElement":{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"x":1,"y":1,"width":1,"height":1,"mask":{"type":"rectangle"},"isBackground":true,"isDefaultBackground":true,"type":"shape","id":"13c50b8d-b251-4ffe-b15f-e41541a64185","basedOn":"11ef0ff2-7ece-45b6-b2ff-64736e54ce84"}},{"elements":[{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"x":39,"y":11,"width":330,"height":494,"mask":{"type":"rectangle"},"isBackground":true,"type":"image","id":"f3a5f63f-1458-48b0-b7b5-9f254acd553f","basedOn":"baa9276c-1206-430d-b0a3-68699a42dee3","scale":100,"focalX":42.051630488779686,"focalY":50.06738994519435,"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=MnwxMzcxOTN8MHwxfHNlYXJjaHwxfHxkZXZvcHN8ZW58MHx8fHwxNjYyNjMwODM1&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=MnwxMzcxOTN8MHwxfHNlYXJjaHwxfHxkZXZvcHN8ZW58MHx8fHwxNjYyNjMwODM1&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=MnwxMzcxOTN8MHwxfHNlYXJjaHwxfHxkZXZvcHN8ZW58MHx8fHwxNjYyNjMwODM1&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=MnwxMzcxOTN8MHwxfHNlYXJjaHwxfHxkZXZvcHN8ZW58MHx8fHwxNjYyNjMwODM1&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=MnwxMzcxOTN8MHwxfHNlYXJjaHwxfHxkZXZvcHN8ZW58MHx8fHwxNjYyNjMwODM1&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=MnwxMzcxOTN8MHwxfHNlYXJjaHwxfHxkZXZvcHN8ZW58MHx8fHwxNjYyNjMwODM1&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=MnwxMzcxOTN8MHwxfHNlYXJjaHwxfHxkZXZvcHN8ZW58MHx8fHwxNjYyNjMwODM1&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=ARX97wMpgUNkkLfVbWmGlkVtBjzh6DAcGYPwF53Br1Gs20EiryXmtpsOfBqrkjNKAfm7J6XrXH9scGsYxQP7Jv7F08BYj\/wNOx7HD3onQ6BVUnUzImq6EImbe%2B90LmxiIl3VC1e11CZ638zRXMyax\/\/tuwX%2BSRAyG\/P\/Ur3JbPsTsyIjRMjfueaaLHQED0GsFuRVbAKnsWYQKgwYnortw3GD1NZYOrcJvBg4XVg4RPM%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":360,"lockAspectRatio":true,"backgroundTextMode":"NONE","font":{"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}},"fontSize":28,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":1.2,"textAlign":"left","padding":{"locked":true,"hasHiddenPadding":false,"horizontal":null,"vertical":null},"type":"text","content":"<span style=\"color: #fff\">Given a string, find the length of the longest substring without repeating characters.<\/span>","fontWeight":400,"borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"width":327,"height":106,"scale":100,"focalX":50,"focalY":50,"basedOn":"7bb8f5a3-dbd4-41bc-9727-7be2fd18d627","id":"a9b062b0-2d85-4283-90de-abebe426d93e","x":38,"y":250,"groupId":null},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"x":0,"y":-39,"width":180,"height":60,"mask":{"type":"rectangle"},"type":"image","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},"basedOn":"fc6c6249-6fbf-4dbc-a29e-1a11b2b9d388","id":"e64b8ab6-68f8-4509-a5cb-63718f86f4b8"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"NONE","font":{"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}},"fontSize":45,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":0.9,"textAlign":"left","padding":{"locked":true,"hasHiddenPadding":false,"horizontal":null,"vertical":null},"type":"text","content":"<span style=\"font-weight: 700; color: #e06e04\">Problem Statement<\/span>","fontWeight":700,"borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"x":38,"y":170,"width":350,"height":61,"scale":100,"focalX":50,"focalY":50,"marginOffset":-33.45600000000001,"basedOn":"fe40eb21-25ed-42ed-9f2d-bf0c31a99167","groupId":null,"id":"8b0e7f2d-4f9f-4095-9af1-92f32be86168"}],"animations":[{"id":"5237536d-e557-4f48-a49f-1a58a0985efe","type":"effect-zoom","scaleDirection":"scaleIn","duration":2000,"delay":0,"targets":["a9b062b0-2d85-4283-90de-abebe426d93e"]},{"targets":["f3a5f63f-1458-48b0-b7b5-9f254acd553f"],"id":"61c2ff4d-0c39-412a-aaea-24a1cbfcaa39","type":"effect-background-zoom","zoomDirection":"scaleOut","duration":2000,"delay":0},{"targets":["8b0e7f2d-4f9f-4095-9af1-92f32be86168"],"id":"bb942bc5-c575-45dd-ae00-cdd40cca71c0","type":"effect-zoom","scaleDirection":"scaleIn","duration":2000,"delay":0}],"backgroundOverlay":"none","backgroundColor":{"color":{"r":18,"g":32,"b":54}},"type":"page","id":"881c1680-f6c7-4e2a-a639-216d468bb84c","pageTemplateType":"section","groups":[],"defaultBackgroundElement":{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"x":1,"y":1,"width":1,"height":1,"mask":{"type":"rectangle"},"isBackground":true,"isDefaultBackground":true,"type":"shape","id":"ca5cda4b-480b-4b33-b233-5f7ae6737614","basedOn":"baa9276c-1206-430d-b0a3-68699a42dee3"},"pageAttachment":{"url":"https:\/\/www.interviewbit.com\/blog\/longest-substring-without-repeating-characters\/?utm_source=Ib&utm_medium=longest-substring-without-repeating-characters&utm_campaign=webstories","icon":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/10\/Banner-1-1.png","needsProxy":false,"ctaText":"Read more"}},{"elements":[{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"x":48,"y":0,"width":330,"height":220,"mask":{"type":"rectangle"},"isBackground":true,"type":"image","id":"dc9776bd-a5e5-41cc-9160-89bf8e196164","basedOn":"baa9276c-1206-430d-b0a3-68699a42dee3","scale":100,"focalX":50,"focalY":50,"resource":{"baseColor":"#f3f3f3","blurHash":"LhK^{X%hIot7_4R,xFoLVrRjR+Rj","type":"image","mimeType":"image\/jpeg","creationDate":"2019-11-07T22:10:23Z","src":"https:\/\/images.unsplash.com\/photo-1573164574572-cb89e39749b4?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxMHx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY2NjYyMzI3MA&ixlib=rb-4.0.3&fm=jpg&w=6016&h=4016&fit=max","width":6016,"height":4016,"id":"media\/unsplash:faEfWCdOKIg","alt":"group of people sitting beside rectangular wooden table with laptops","sizes":{"full":{"file":"media\/unsplash:faEfWCdOKIg","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573164574572-cb89e39749b4?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxMHx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY2NjYyMzI3MA&ixlib=rb-4.0.3&fm=jpg&w=6016&h=4016&fit=max","mimeType":"image\/jpeg","width":6016,"height":4016},"large":{"file":"media\/unsplash:faEfWCdOKIg","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573164574572-cb89e39749b4?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxMHx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY2NjYyMzI3MA&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:faEfWCdOKIg","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573164574572-cb89e39749b4?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxMHx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY2NjYyMzI3MA&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:faEfWCdOKIg","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573164574572-cb89e39749b4?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxMHx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY2NjYyMzI3MA&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:faEfWCdOKIg","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573164574572-cb89e39749b4?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxMHx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY2NjYyMzI3MA&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:faEfWCdOKIg","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573164574572-cb89e39749b4?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHwxMHx8c29mdHdhcmUlMjBkZXZlbG9wZXJzfGVufDB8fHx8MTY2NjYyMzI3MA&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=AQBR4tq4Qzvi8HCFK6g0Q95HeFlxGhAUdG10kdfva30t9FYR1kMja2\/kKj2LqJdlSziskrlU7jrDiPbPaBDej%2BqRhfhLvWlYECPpbhJrOc3ssAuqRLuO6U%2B8eSSeAjqRiS0Uqh2\/LC3m1Nk8%2BVnzK3x3GdOnwpk\/1J%2BYIrkBWK\/bEhHW8N4GfKKrChMPtz3dtKO4ocbzjAeAKDf9U1\/wb1ZItuA%2BEXSSIea2o8e6w3aRVT7O1v9kqMaZHHgwgd9UhnOvazsX"},"isPlaceholder":false,"isOptimized":false,"isMuted":false,"isExternal":true,"needsProxy":false},"overlay":{"color":{"r":0,"g":0,"b":0,"a":0.55}}},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"NONE","font":{"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}},"fontSize":28,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":1.2,"textAlign":"left","padding":{"locked":true,"hasHiddenPadding":false,"horizontal":null,"vertical":null},"type":"text","content":"<span style=\"font-weight: 700; color: #fff\">Input:<\/span><span style=\"color: #fff\"> S = \u201cabcabcbb\u201d&nbsp;<\/span>\n<span style=\"font-weight: 700; color: #fff\">Output: <\/span><span style=\"color: #fff\">3&nbsp;<\/span>\n<span style=\"font-weight: 700; color: #fff\">Explanation: <\/span><span style=\"color: #fff\">\u201cabc\u201d is the longest substring without repeating characters among all the substrings.<\/span>","fontWeight":400,"borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"width":348,"height":205,"scale":100,"focalX":50,"focalY":50,"basedOn":"e5fd183e-3dbc-4fb1-958a-be04a3706844","id":"10a12e2a-8a3d-47a0-bb92-294a0c6e9cff","x":32,"y":228,"groupId":null},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"x":0,"y":-39,"width":180,"height":60,"mask":{"type":"rectangle"},"type":"image","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},"basedOn":"84a9fe46-f171-471f-bb69-fb55fff093d6","id":"272f6859-b105-49e3-ad7b-f45fd2aa76ca"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"NONE","font":{"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}},"fontSize":45,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":0.9,"textAlign":"left","padding":{"locked":true,"hasHiddenPadding":false,"horizontal":null,"vertical":null},"type":"text","content":"<span style=\"font-weight: 700; color: #e06e04\">Examples<\/span>","fontWeight":700,"borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"x":32,"y":142,"width":366,"height":61,"scale":100,"focalX":50,"focalY":50,"marginOffset":-33.45600000000001,"basedOn":"f8715e9b-cceb-48d2-868a-ec52efdd16b0","groupId":null,"id":"8bbb9b93-ca19-41f3-aed7-8b4b675e14b9"}],"animations":[{"id":"d02c37e2-403d-4f25-a8cc-290236e457a1","type":"effect-zoom","scaleDirection":"scaleIn","duration":2000,"delay":0,"targets":["10a12e2a-8a3d-47a0-bb92-294a0c6e9cff"]},{"id":"299b2e56-74b7-43be-ba38-0876691e8865","type":"effect-background-zoom","zoomDirection":"scaleOut","duration":2000,"delay":0,"targets":["dc9776bd-a5e5-41cc-9160-89bf8e196164"]},{"targets":["8bbb9b93-ca19-41f3-aed7-8b4b675e14b9"],"id":"67226f3e-f769-4bb5-9e47-94eedfb8cd52","type":"effect-zoom","scaleDirection":"scaleIn","duration":2000,"delay":0}],"backgroundOverlay":"none","backgroundColor":{"color":{"r":18,"g":32,"b":54}},"type":"page","id":"277173cc-5715-49f8-a52a-cc1d7614dffc","pageTemplateType":"section","groups":[],"defaultBackgroundElement":{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"x":1,"y":1,"width":1,"height":1,"mask":{"type":"rectangle"},"isBackground":true,"isDefaultBackground":true,"type":"shape","id":"733dd99c-1d86-40f7-b570-e94cdf5b3b1c","basedOn":"baa9276c-1206-430d-b0a3-68699a42dee3"},"pageAttachment":{"url":"https:\/\/www.interviewbit.com\/blog\/longest-substring-without-repeating-characters\/?utm_source=Ib&utm_medium=longest-substring-without-repeating-characters&utm_campaign=webstories","icon":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/10\/Banner-1-1.png","needsProxy":false,"ctaText":"Check more examples"}},{"elements":[{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"x":39,"y":11,"width":330,"height":494,"mask":{"type":"rectangle"},"isBackground":true,"type":"image","id":"15fc455c-8aec-405d-9b72-81ecfc9f4aef","basedOn":"30ac49d1-3343-4f30-a649-2806c4ad70e3","scale":100,"focalX":42.051630488779686,"focalY":50.06738994519435,"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=MnwxMzcxOTN8MHwxfHNlYXJjaHwxfHxkZXZvcHN8ZW58MHx8fHwxNjYyNjMwODM1&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=MnwxMzcxOTN8MHwxfHNlYXJjaHwxfHxkZXZvcHN8ZW58MHx8fHwxNjYyNjMwODM1&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=MnwxMzcxOTN8MHwxfHNlYXJjaHwxfHxkZXZvcHN8ZW58MHx8fHwxNjYyNjMwODM1&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=MnwxMzcxOTN8MHwxfHNlYXJjaHwxfHxkZXZvcHN8ZW58MHx8fHwxNjYyNjMwODM1&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=MnwxMzcxOTN8MHwxfHNlYXJjaHwxfHxkZXZvcHN8ZW58MHx8fHwxNjYyNjMwODM1&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=MnwxMzcxOTN8MHwxfHNlYXJjaHwxfHxkZXZvcHN8ZW58MHx8fHwxNjYyNjMwODM1&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=MnwxMzcxOTN8MHwxfHNlYXJjaHwxfHxkZXZvcHN8ZW58MHx8fHwxNjYyNjMwODM1&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=ARX97wMpgUNkkLfVbWmGlkVtBjzh6DAcGYPwF53Br1Gs20EiryXmtpsOfBqrkjNKAfm7J6XrXH9scGsYxQP7Jv7F08BYj\/wNOx7HD3onQ6BVUnUzImq6EImbe%2B90LmxiIl3VC1e11CZ638zRXMyax\/\/tuwX%2BSRAyG\/P\/Ur3JbPsTsyIjRMjfueaaLHQED0GsFuRVbAKnsWYQKgwYnortw3GD1NZYOrcJvBg4XVg4RPM%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,"backgroundTextMode":"NONE","font":{"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}},"fontSize":28,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":1.2,"textAlign":"left","padding":{"locked":true,"hasHiddenPadding":false,"horizontal":null,"vertical":null},"type":"text","content":"<span style=\"color: #fff\">1. Generate all substrings of the given string.<\/span>\n\n<span style=\"color: #fff\">2. Check if the substring has all unique characters.<\/span>\n\n<span style=\"color: #fff\">3. Return the max length of substrings with unique characters<\/span>","fontWeight":400,"borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"width":342,"height":272,"scale":100,"focalX":50,"focalY":50,"basedOn":"8255e0b1-21c3-433d-8b5a-3d960f385949","id":"84ea2df9-ceff-472a-bac3-cf281b1ff14a","x":36,"y":226,"groupId":null},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"x":0,"y":-39,"width":180,"height":60,"mask":{"type":"rectangle"},"type":"image","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},"basedOn":"84a9fe46-f171-471f-bb69-fb55fff093d6","id":"d8513910-8a83-4deb-b566-2db31069c93c"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"NONE","font":{"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}},"fontSize":45,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":0.9,"textAlign":"left","padding":{"locked":true,"hasHiddenPadding":false,"horizontal":null,"vertical":null},"type":"text","content":"<span style=\"font-weight: 700; color: #e06e04\">Bruteforce Approach<\/span>","fontWeight":700,"borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"x":37,"y":112,"width":355,"height":102,"scale":100,"focalX":50,"focalY":50,"marginOffset":-33.45600000000001,"basedOn":"8bbb9b93-ca19-41f3-aed7-8b4b675e14b9","groupId":null,"id":"cdb5f77b-5dcc-404e-a030-49efdee30598"}],"animations":[{"id":"ce9d43d9-54b3-44ca-9596-a05196311a3a","type":"effect-zoom","scaleDirection":"scaleIn","duration":2000,"delay":0,"targets":["84ea2df9-ceff-472a-bac3-cf281b1ff14a"]},{"targets":["15fc455c-8aec-405d-9b72-81ecfc9f4aef"],"id":"ba21f1ff-ef64-4be6-83af-c402d9243ebc","type":"effect-background-zoom","zoomDirection":"scaleOut","duration":2000,"delay":0},{"targets":["cdb5f77b-5dcc-404e-a030-49efdee30598"],"id":"0919e84b-1a6b-4a0e-ab92-8f05ec1daeb2","type":"effect-zoom","scaleDirection":"scaleIn","duration":2000,"delay":0}],"backgroundOverlay":"none","backgroundColor":{"color":{"r":18,"g":32,"b":54}},"type":"page","id":"bc60c57e-a103-4417-900c-bd0d04f53aef","pageTemplateType":"section","groups":[],"defaultBackgroundElement":{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"x":1,"y":1,"width":1,"height":1,"mask":{"type":"rectangle"},"isBackground":true,"isDefaultBackground":true,"type":"shape","id":"998a0474-d77b-4894-aa13-0655967a53c6","basedOn":"baa9276c-1206-430d-b0a3-68699a42dee3"},"pageAttachment":{"url":"https:\/\/www.interviewbit.com\/blog\/longest-substring-without-repeating-characters\/?utm_source=Ib&utm_medium=longest-substring-without-repeating-characters&utm_campaign=webstories","icon":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/10\/Banner-1-1.png","needsProxy":false,"ctaText":"Check its algorithm"}},{"elements":[{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"x":48,"y":0,"width":330,"height":494,"mask":{"type":"rectangle"},"isBackground":true,"type":"image","id":"883223f5-830e-4ae0-9120-2707c519df5d","basedOn":"fcfea806-f29d-467a-a569-2d468f999028","scale":100,"focalX":50,"focalY":50,"resource":{"baseColor":"#262626","blurHash":"LeF~mtD%IUt8~qayM{t7kBt8j?Rj","type":"image","mimeType":"image\/jpeg","creationDate":"2021-02-09T23:42:43Z","src":"https:\/\/images.unsplash.com\/photo-1612914033131-2fbd331a3806?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw1OHx8ZGF0YSUyMGFuYWx5dGljc3xlbnwwfHx8fDE2NjM3NTgzMDc&ixlib=rb-1.2.1&fm=jpg&w=4000&h=6000&fit=max","width":4000,"height":6000,"id":"media\/unsplash:2w2NcgP3XNs","alt":"media\/unsplash:2w2NcgP3XNs","sizes":{"full":{"file":"media\/unsplash:2w2NcgP3XNs","sourceUrl":"https:\/\/images.unsplash.com\/photo-1612914033131-2fbd331a3806?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw1OHx8ZGF0YSUyMGFuYWx5dGljc3xlbnwwfHx8fDE2NjM3NTgzMDc&ixlib=rb-1.2.1&fm=jpg&w=4000&h=6000&fit=max","mimeType":"image\/jpeg","width":4000,"height":6000},"large":{"file":"media\/unsplash:2w2NcgP3XNs","sourceUrl":"https:\/\/images.unsplash.com\/photo-1612914033131-2fbd331a3806?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw1OHx8ZGF0YSUyMGFuYWx5dGljc3xlbnwwfHx8fDE2NjM3NTgzMDc&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:2w2NcgP3XNs","sourceUrl":"https:\/\/images.unsplash.com\/photo-1612914033131-2fbd331a3806?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw1OHx8ZGF0YSUyMGFuYWx5dGljc3xlbnwwfHx8fDE2NjM3NTgzMDc&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:2w2NcgP3XNs","sourceUrl":"https:\/\/images.unsplash.com\/photo-1612914033131-2fbd331a3806?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw1OHx8ZGF0YSUyMGFuYWx5dGljc3xlbnwwfHx8fDE2NjM3NTgzMDc&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:2w2NcgP3XNs","sourceUrl":"https:\/\/images.unsplash.com\/photo-1612914033131-2fbd331a3806?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw1OHx8ZGF0YSUyMGFuYWx5dGljc3xlbnwwfHx8fDE2NjM3NTgzMDc&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:2w2NcgP3XNs","sourceUrl":"https:\/\/images.unsplash.com\/photo-1612914033131-2fbd331a3806?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw1OHx8ZGF0YSUyMGFuYWx5dGljc3xlbnwwfHx8fDE2NjM3NTgzMDc&ixlib=rb-1.2.1&fm=jpg&w=340&h=510&fit=max","mimeType":"image\/jpeg","width":340,"height":510}},"attribution":{"author":{"displayName":"Mar\u00edlia Castelli","url":"https:\/\/unsplash.com\/@liacastelli?utm_source=web_stories_wordpress&utm_medium=referral"},"registerUsageUrl":"https:\/\/media3p.googleapis.com\/v1\/media:registerUsage?token=AQBR4tptocw8ALDZNI1EvoZXoFcoQUER8QQUsd\/WW8GWIUmddhvBpjgAetIP67gEiigGe9AbVMnHsxsTbKj%2Bm%2Be3m5YWciW4qKUhqP%2BBhKLUYH5ozbIHPmqZ85aZz44jIPv46cgPdh9%2BUsXT8bCgfMdsEmH%2BTe\/aVVcmm2oJY72gAU5IkjJK0yJV9lRJoZm\/Q9KP6AJ2Zko79rkK%2BaxqAZI9osgbh5lj8gpwgj6ykOUpYS%2B6AIWKPNy7rFDICAc%3D"},"isPlaceholder":false,"isOptimized":false,"isMuted":false,"isExternal":true,"needsProxy":false},"overlay":{"color":{"r":0,"g":0,"b":0,"a":0.5}},"alt":"Weather Reporting System using IoT"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"x":0,"y":-39,"width":180,"height":60,"mask":{"type":"rectangle"},"type":"image","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},"basedOn":"4d100811-c298-4d15-b93e-8f34817fc83a","id":"1f5f27f4-5dfe-431a-a50f-d7d2f6a3195f"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"NONE","font":{"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}},"fontSize":28,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":1.2,"textAlign":"left","padding":{"locked":true,"hasHiddenPadding":false,"horizontal":null,"vertical":null},"type":"text","content":"<span style=\"font-weight: 700; color: #e06e04\">Time Complexity: <\/span><span style=\"color: #fff\">O(N^3), where N is string length&nbsp;<\/span>\n\n<span style=\"font-weight: 700; color: #e06e04\">Space Complexity: <\/span><span style=\"color: #fff\">O(min(N, M)), as HashSet is used. N is the string length, and M is the size of the substring.<\/span>","fontWeight":400,"borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"width":342,"height":240,"scale":100,"focalX":50,"focalY":50,"basedOn":"85f0fcac-0cce-4165-b583-605e09c8dd05","x":35,"y":205,"groupId":null,"id":"28317bd2-7ada-4b27-9743-f83433cd9a66"}],"animations":[{"targets":["28317bd2-7ada-4b27-9743-f83433cd9a66"],"id":"8ee0ef17-5600-4e3e-9c5e-22816890f881","type":"effect-zoom","scaleDirection":"scaleIn","duration":2000,"delay":0},{"targets":["883223f5-830e-4ae0-9120-2707c519df5d"],"id":"e3033d47-066c-4a54-853e-8a613ce0c075","type":"effect-background-zoom","zoomDirection":"scaleOut","duration":2000,"delay":0}],"backgroundOverlay":"none","backgroundColor":{"color":{"r":18,"g":32,"b":54}},"type":"page","id":"1a191061-ddbb-4550-abcf-f0bc85dc7287","pageTemplateType":"section","groups":[],"defaultBackgroundElement":{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"x":1,"y":1,"width":1,"height":1,"mask":{"type":"rectangle"},"isBackground":true,"isDefaultBackground":true,"type":"shape","id":"998a0474-d77b-4894-aa13-0655967a53c6","basedOn":"baa9276c-1206-430d-b0a3-68699a42dee3"},"pageAttachment":{"url":"https:\/\/www.interviewbit.com\/blog\/longest-substring-without-repeating-characters\/?utm_source=Ib&utm_medium=longest-substring-without-repeating-characters&utm_campaign=webstories","icon":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/10\/Banner-1-1.png","needsProxy":false,"ctaText":"Read more"}},{"elements":[{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"x":48,"y":0,"width":330,"height":494,"mask":{"type":"rectangle"},"isBackground":true,"type":"image","id":"998a0474-d77b-4894-aa13-0655967a53c6","basedOn":"baa9276c-1206-430d-b0a3-68699a42dee3","scale":100,"focalX":50,"focalY":50,"resource":{"baseColor":"#f3f3f3","blurHash":"LxN,lGof_NV@.8ofM{oztlRjROof","type":"image","mimeType":"image\/jpeg","creationDate":"2019-11-07T22:13:50Z","src":"https:\/\/images.unsplash.com\/photo-1573164713350-b14a82d3c15b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw1NXx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjcxNTM2Nzkz&ixlib=rb-4.0.3&fm=jpg&w=4016&h=6016&fit=max","width":4016,"height":6016,"id":"media\/unsplash:XmvKl8CDMrk","alt":"woman in red and black jacket holding laptop","sizes":{"full":{"file":"media\/unsplash:XmvKl8CDMrk","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573164713350-b14a82d3c15b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw1NXx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjcxNTM2Nzkz&ixlib=rb-4.0.3&fm=jpg&w=4016&h=6016&fit=max","mimeType":"image\/jpeg","width":4016,"height":6016},"large":{"file":"media\/unsplash:XmvKl8CDMrk","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573164713350-b14a82d3c15b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw1NXx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjcxNTM2Nzkz&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:XmvKl8CDMrk","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573164713350-b14a82d3c15b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw1NXx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjcxNTM2Nzkz&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:XmvKl8CDMrk","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573164713350-b14a82d3c15b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw1NXx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjcxNTM2Nzkz&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:XmvKl8CDMrk","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573164713350-b14a82d3c15b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw1NXx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjcxNTM2Nzkz&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:XmvKl8CDMrk","sourceUrl":"https:\/\/images.unsplash.com\/photo-1573164713350-b14a82d3c15b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw1NXx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjcxNTM2Nzkz&ixlib=rb-4.0.3&fm=jpg&w=340&h=509&fit=max","mimeType":"image\/jpeg","width":340,"height":509}},"attribution":{"author":{"displayName":"Christina @ wocintechchat.com","url":"https:\/\/unsplash.com\/@wocintechchat?utm_source=web_stories_wordpress&utm_medium=referral"},"registerUsageUrl":"https:\/\/media3p.googleapis.com\/v1\/media:registerUsage?token=AXhJFEd5hXouSmycDGzoDBh7W%2BpQqHAkJWE5wLyK2bG1mVEafem0xw3ocQP\/tawBmZwoI\/D2yktMlD75aSqZK5BYUQEPG5djGEa\/9ee24ueHZN7\/M8Fn5HgqyfKGxpkUEgRfcYM8yNHsciaFY9EVnHkykktBftV95z2r1EnSKua1NtEinAWLXS7S%2BuaWe4dhDUsUj9WGfyCM5J6B725ioRp2M4OUlbIxRY0g1bKl\/g3U2EHYC27QgQV31jhnkqqzIBBxqw%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,"x":0,"y":-39,"width":180,"height":60,"mask":{"type":"rectangle"},"type":"image","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},"basedOn":"1f5f27f4-5dfe-431a-a50f-d7d2f6a3195f","id":"673d7e25-2b23-41fd-b965-31c082b0b9df"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"NONE","font":{"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}},"fontSize":28,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":1.2,"textAlign":"left","padding":{"locked":true,"hasHiddenPadding":false,"horizontal":null,"vertical":null},"type":"text","content":"<span style=\"color: #fff\">It only checks if the new character added to the substring is a duplicate rather than checking all substrings for duplicates. This avoids repeating tasks and increases efficiency.<\/span>","fontWeight":400,"borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"width":342,"height":205,"scale":100,"focalX":50,"focalY":50,"basedOn":"28317bd2-7ada-4b27-9743-f83433cd9a66","x":38,"y":241,"groupId":null,"id":"1372ae18-bf87-4a00-b7fe-30934715daf8"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"NONE","font":{"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}},"fontSize":45,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":0.9,"textAlign":"left","padding":{"locked":true,"hasHiddenPadding":false,"horizontal":null,"vertical":null},"type":"text","content":"<span style=\"font-weight: 700; color: #e06e04\">Sliding Window Approach<\/span>","fontWeight":700,"borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"x":37,"y":123,"width":355,"height":102,"scale":100,"focalX":50,"focalY":50,"marginOffset":-33.45600000000001,"basedOn":"cdb5f77b-5dcc-404e-a030-49efdee30598","groupId":null,"id":"8f683ba0-d5e2-43fb-a9de-fcc3bc7cf9c7"}],"animations":[{"targets":["1372ae18-bf87-4a00-b7fe-30934715daf8"],"id":"3927c58b-13ca-41c8-a12a-ed37b6332181","type":"effect-zoom","scaleDirection":"scaleIn","duration":2000,"delay":0},{"targets":["8f683ba0-d5e2-43fb-a9de-fcc3bc7cf9c7"],"id":"54b2dd72-3fda-4c4b-95b6-911058625e12","type":"effect-zoom","scaleDirection":"scaleIn","duration":2000,"delay":0},{"id":"861f2bf4-2605-4926-bd0e-093d9f08f519","type":"effect-background-zoom","zoomDirection":"scaleOut","duration":2000,"delay":0,"targets":["998a0474-d77b-4894-aa13-0655967a53c6"]}],"backgroundOverlay":"none","backgroundColor":{"color":{"r":18,"g":32,"b":54}},"type":"page","id":"bbc58edc-f0c3-4d1d-8c2e-0d48cf8bda69","pageTemplateType":"section","groups":[],"defaultBackgroundElement":{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"x":1,"y":1,"width":1,"height":1,"mask":{"type":"rectangle"},"isBackground":true,"isDefaultBackground":true,"type":"shape","id":"c70c28ac-0f12-4289-984a-9663b53788d9","basedOn":"baa9276c-1206-430d-b0a3-68699a42dee3"},"pageAttachment":{"url":"https:\/\/www.interviewbit.com\/blog\/longest-substring-without-repeating-characters\/?utm_source=Ib&utm_medium=longest-substring-without-repeating-characters&utm_campaign=webstories","icon":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/10\/Banner-1-1.png","needsProxy":false,"ctaText":"Check its algorithm"}},{"elements":[{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"x":48,"y":0,"width":330,"height":494,"mask":{"type":"rectangle"},"isBackground":true,"type":"image","id":"998a0474-d77b-4894-aa13-0655967a53c6","basedOn":"baa9276c-1206-430d-b0a3-68699a42dee3","scale":100,"focalX":50,"focalY":50,"resource":{"baseColor":"#f3d9d9","blurHash":"LhHn?As.S5WB01RkjZRj?ajuM{of","type":"image","mimeType":"image\/jpeg","creationDate":"2020-02-07T15:17:48Z","src":"https:\/\/images.unsplash.com\/photo-1581087724844-037b13e16b0b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw5Nnx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjcxNTM2ODUy&ixlib=rb-4.0.3&fm=jpg&w=6630&h=9940&fit=max","width":6630,"height":9940,"id":"media\/unsplash:3cx_tx4h9oI","alt":"woman in black shirt using computer","sizes":{"full":{"file":"media\/unsplash:3cx_tx4h9oI","sourceUrl":"https:\/\/images.unsplash.com\/photo-1581087724844-037b13e16b0b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw5Nnx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjcxNTM2ODUy&ixlib=rb-4.0.3&fm=jpg&w=6630&h=9940&fit=max","mimeType":"image\/jpeg","width":6630,"height":9940},"large":{"file":"media\/unsplash:3cx_tx4h9oI","sourceUrl":"https:\/\/images.unsplash.com\/photo-1581087724844-037b13e16b0b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw5Nnx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjcxNTM2ODUy&ixlib=rb-4.0.3&fm=jpg&w=5304&h=7952&fit=max","mimeType":"image\/jpeg","width":5304,"height":7952},"3978_5964":{"file":"media\/unsplash:3cx_tx4h9oI","sourceUrl":"https:\/\/images.unsplash.com\/photo-1581087724844-037b13e16b0b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw5Nnx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjcxNTM2ODUy&ixlib=rb-4.0.3&fm=jpg&w=3978&h=5964&fit=max","mimeType":"image\/jpeg","width":3978,"height":5964},"2652_3976":{"file":"media\/unsplash:3cx_tx4h9oI","sourceUrl":"https:\/\/images.unsplash.com\/photo-1581087724844-037b13e16b0b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw5Nnx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjcxNTM2ODUy&ixlib=rb-4.0.3&fm=jpg&w=2652&h=3976&fit=max","mimeType":"image\/jpeg","width":2652,"height":3976},"1326_1988":{"file":"media\/unsplash:3cx_tx4h9oI","sourceUrl":"https:\/\/images.unsplash.com\/photo-1581087724844-037b13e16b0b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw5Nnx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjcxNTM2ODUy&ixlib=rb-4.0.3&fm=jpg&w=1326&h=1988&fit=max","mimeType":"image\/jpeg","width":1326,"height":1988},"web_stories_thumbnail":{"file":"media\/unsplash:3cx_tx4h9oI","sourceUrl":"https:\/\/images.unsplash.com\/photo-1581087724844-037b13e16b0b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw5Nnx8c29mdHdhcmUlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjcxNTM2ODUy&ixlib=rb-4.0.3&fm=jpg&w=340&h=510&fit=max","mimeType":"image\/jpeg","width":340,"height":510}},"attribution":{"author":{"displayName":"ThisisEngineering RAEng","url":"https:\/\/unsplash.com\/@thisisengineering?utm_source=web_stories_wordpress&utm_medium=referral"},"registerUsageUrl":"https:\/\/media3p.googleapis.com\/v1\/media:registerUsage?token=AXhJFEcQadHA8FlxdDtx2HhgN5DCB\/Pv\/LHgyYcKQ2jBp2ZL5gB1lRLvaF7cFzk2iPpLG00QQcCqAaHo9vr9K%2Bgkr4Vzedz7RRcKeN0EXcSJkHf8dtBddTYKWxXQD5TEDxIZwLPw1OyWVtbDlJ2YrMGXOJdEpTkGqqgHnLyKYoFkYfcYYqMITq1xZAFbONmbsosASmNz2qjImFyqi0%2BV3kC8wKrfQiYi9sXe4wkXU2tUSwQays%2BlOMa691NCPVZMlEES8g%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,"x":0,"y":-39,"width":180,"height":60,"mask":{"type":"rectangle"},"type":"image","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},"basedOn":"673d7e25-2b23-41fd-b965-31c082b0b9df","id":"835a0d5a-5680-4139-a64b-b9a18c397e8e"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"NONE","font":{"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}},"fontSize":28,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":1.2,"textAlign":"left","padding":{"locked":true,"hasHiddenPadding":false,"horizontal":null,"vertical":null},"type":"text","content":"<span style=\"font-weight: 700; color: #e06e04\">Time Complexity: <\/span><span style=\"color: #fff\">O(N^2), where N is string length&nbsp;<\/span>\n\n<span style=\"font-weight: 700; color: #e06e04\">Space Complexity: <\/span><span style=\"color: #fff\">O(min(N, M)), as HashSet is used. N is the string length, and M is the size of the substring.<\/span>","fontWeight":400,"borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"width":342,"height":240,"scale":100,"focalX":50,"focalY":50,"basedOn":"1372ae18-bf87-4a00-b7fe-30934715daf8","x":38,"y":190,"groupId":null,"id":"289bfc4d-8123-4640-93b9-66fd5dab08f4"}],"animations":[{"targets":["289bfc4d-8123-4640-93b9-66fd5dab08f4"],"id":"06ada73a-bf03-4c79-8cea-d89a86351abf","type":"effect-zoom","scaleDirection":"scaleIn","duration":2000,"delay":0},{"id":"755f2c36-2ed4-4898-bdb3-aec11e7c7e61","type":"effect-background-zoom","zoomDirection":"scaleOut","duration":2000,"delay":0,"targets":["998a0474-d77b-4894-aa13-0655967a53c6"]}],"backgroundOverlay":"none","backgroundColor":{"color":{"r":18,"g":32,"b":54}},"type":"page","id":"c9a3f5ad-0353-457a-8fa5-358a3930d76f","pageTemplateType":"section","groups":[],"defaultBackgroundElement":{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"x":1,"y":1,"width":1,"height":1,"mask":{"type":"rectangle"},"isBackground":true,"isDefaultBackground":true,"type":"shape","id":"339f0b48-b65c-4f2c-b214-ac587b327202","basedOn":"baa9276c-1206-430d-b0a3-68699a42dee3"},"pageAttachment":{"url":"https:\/\/www.interviewbit.com\/blog\/longest-substring-without-repeating-characters\/?utm_source=Ib&utm_medium=longest-substring-without-repeating-characters&utm_campaign=webstories","icon":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/10\/Banner-1-1.png","needsProxy":false,"ctaText":"Read More"}},{"elements":[{"x":48,"y":0,"width":330,"height":412,"type":"image","opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"mask":{"type":"rectangle"},"isBackground":true,"id":"ae3f6c5c-5c72-4ba8-b6bc-e71174f9ed50","basedOn":"5249418e-8fb7-46d7-8af1-835671d52f2b","scale":100,"focalX":50,"focalY":50,"resource":{"baseColor":"#f3f3f3","blurHash":"LIHCK5tkV@?aOv?uR.s,~VIU9EjX","type":"image","mimeType":"image\/jpeg","creationDate":"2020-01-19T03:05:44Z","src":"https:\/\/images.unsplash.com\/photo-1579403124614-197f69d8187b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw4fHxqYXZhfGVufDB8fHx8MTY2NjI1MTk3NQ&ixlib=rb-4.0.3&fm=jpg&w=3394&h=4243&fit=max","width":3394,"height":4243,"id":"media\/unsplash:QUHuwyNgSA0","alt":"media\/unsplash:QUHuwyNgSA0","sizes":{"full":{"file":"media\/unsplash:QUHuwyNgSA0","sourceUrl":"https:\/\/images.unsplash.com\/photo-1579403124614-197f69d8187b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw4fHxqYXZhfGVufDB8fHx8MTY2NjI1MTk3NQ&ixlib=rb-4.0.3&fm=jpg&w=3394&h=4243&fit=max","mimeType":"image\/jpeg","width":3394,"height":4243},"large":{"file":"media\/unsplash:QUHuwyNgSA0","sourceUrl":"https:\/\/images.unsplash.com\/photo-1579403124614-197f69d8187b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw4fHxqYXZhfGVufDB8fHx8MTY2NjI1MTk3NQ&ixlib=rb-4.0.3&fm=jpg&w=2715&h=3394&fit=max","mimeType":"image\/jpeg","width":2715,"height":3394},"2036_2545":{"file":"media\/unsplash:QUHuwyNgSA0","sourceUrl":"https:\/\/images.unsplash.com\/photo-1579403124614-197f69d8187b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw4fHxqYXZhfGVufDB8fHx8MTY2NjI1MTk3NQ&ixlib=rb-4.0.3&fm=jpg&w=2036&h=2545&fit=max","mimeType":"image\/jpeg","width":2036,"height":2545},"1357_1696":{"file":"media\/unsplash:QUHuwyNgSA0","sourceUrl":"https:\/\/images.unsplash.com\/photo-1579403124614-197f69d8187b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw4fHxqYXZhfGVufDB8fHx8MTY2NjI1MTk3NQ&ixlib=rb-4.0.3&fm=jpg&w=1357&h=1696&fit=max","mimeType":"image\/jpeg","width":1357,"height":1696},"678_848":{"file":"media\/unsplash:QUHuwyNgSA0","sourceUrl":"https:\/\/images.unsplash.com\/photo-1579403124614-197f69d8187b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw4fHxqYXZhfGVufDB8fHx8MTY2NjI1MTk3NQ&ixlib=rb-4.0.3&fm=jpg&w=678&h=848&fit=max","mimeType":"image\/jpeg","width":678,"height":848},"web_stories_thumbnail":{"file":"media\/unsplash:QUHuwyNgSA0","sourceUrl":"https:\/\/images.unsplash.com\/photo-1579403124614-197f69d8187b?ixid=MnwxMzcxOTN8MHwxfHNlYXJjaHw4fHxqYXZhfGVufDB8fHx8MTY2NjI1MTk3NQ&ixlib=rb-4.0.3&fm=jpg&w=340&h=425&fit=max","mimeType":"image\/jpeg","width":340,"height":425}},"attribution":{"author":{"displayName":"Karl Pawlowicz","url":"https:\/\/unsplash.com\/@karlp?utm_source=web_stories_wordpress&utm_medium=referral"},"registerUsageUrl":"https:\/\/media3p.googleapis.com\/v1\/media:registerUsage?token=AQBR4tokwjXMFo3zs16NQJe4fFobYzTq0dSGG0EnvaudCIdqqdOJeRrn2ODkT2F0MFcScsKxTym1EvYZ0PwJWNcSgiArK6Yul%2BurUWWp8ZUV4AZf\/22sTlGIw8FoFmgHz5q5ePs9IdKWDfiIeXKvOUrrxGR6qCLYDYQwoGBKBdH3RfFvhiUasGHoqaLeKnWpghGXjQRwyyQPjr89DOCADJ4j0WchFPSEeoU2LiLI"},"isPlaceholder":false,"isOptimized":false,"isMuted":false,"isExternal":true,"needsProxy":false},"overlay":{"color":{"r":0,"g":0,"b":0,"a":0.5}}},{"x":31,"y":219,"width":348,"height":278,"font":{"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}},"type":"text","opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"NONE","backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":1.2,"textAlign":"left","scale":100,"focalX":50,"focalY":50,"basedOn":"457c0ed6-69da-43c4-ac59-1d1359d980b9","id":"021e0541-35be-4946-80af-40b0a2d780a0","content":"<span style=\"color: #faf4ea\">Explore different approaches and learn how to implement them in various programming languages.<\/span>","fontSize":37,"padding":{"horizontal":0,"vertical":0},"tagName":"h2","marginOffset":-34.87060546875},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"x":0,"y":-39,"width":180,"height":60,"mask":{"type":"rectangle"},"type":"image","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},"basedOn":"84a9fe46-f171-471f-bb69-fb55fff093d6","id":"d8431b7e-175f-447d-8b3d-3fc64bb112fd"}],"animations":[{"id":"2d535ce0-b1ea-4b59-9afe-33fb43378ce5","type":"effect-fly-in","targets":["021e0541-35be-4946-80af-40b0a2d780a0"],"flyInDir":"bottomToTop","duration":1000,"delay":0},{"id":"34e89a65-88bd-4b55-8f1a-4e2fee478f11","type":"effect-background-zoom","zoomDirection":"scaleOut","duration":2000,"delay":0,"targets":["ae3f6c5c-5c72-4ba8-b6bc-e71174f9ed50"]}],"type":"page","id":"b2cd7624-c3ec-4a7d-9867-d7d4dc8f0933","backgroundColor":{"color":{"r":33,"g":31,"b":30}},"pageTemplateType":"section","defaultBackgroundElement":{"x":21,"y":64,"width":128,"height":128,"type":"shape","opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"mask":{"type":"rectangle"},"isBackground":true,"id":"097f0363-56a1-44b8-86bf-59f17f0b0720","isDefaultBackground":true,"basedOn":"5249418e-8fb7-46d7-8af1-835671d52f2b"},"pageAttachment":{"url":"https:\/\/www.interviewbit.com\/blog\/longest-substring-without-repeating-characters\/?utm_source=Ib&utm_medium=longest-substring-without-repeating-characters&utm_campaign=webstories","icon":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/10\/Banner-1-1.png","needsProxy":false,"ctaText":"Explore now"}}],"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":15185,"url":"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/12\/cropped-longest-substring-without-repeating-characters.jpg","width":640,"height":853,"needsProxy":false},"_links":{"self":[{"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/web-stories\/v1\/web-story\/15183"}],"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":3,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/web-stories\/v1\/web-story\/15183\/revisions"}],"predecessor-version":[{"id":15188,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/web-stories\/v1\/web-story\/15183\/revisions\/15188"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/web-stories\/v1\/media\/15185"}],"wp:attachment":[{"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/web-stories\/v1\/media?parent=15183"}],"wp:term":[{"taxonomy":"web_story_category","embeddable":true,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/web-stories\/v1\/web_story_category?post=15183"},{"taxonomy":"web_story_tag","embeddable":true,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/web-stories\/v1\/web_story_tag?post=15183"}],"wp:lock":[{"embeddable":true,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/web-stories\/v1\/web-story\/15183\/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}]}}