CINXE.COM
Puzzles - GeeksforGeeks
<!DOCTYPE html> <!--[if IE 7]> <html class="ie ie7" lang="en-US" prefix="og: http://ogp.me/ns#"> <![endif]--> <!--[if IE 8]> <html class="ie ie8" lang="en-US" prefix="og: http://ogp.me/ns#"> <![endif]--> <!--[if !(IE 7) | !(IE 8) ]><!--> <html lang="en-US" prefix="og: http://ogp.me/ns#" > <!--<![endif]--> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=0.5, maximum-scale=3.0"> <link rel="shortcut icon" href="https://media.geeksforgeeks.org/wp-content/cdn-uploads/gfg_favicon.png" type="image/x-icon" /> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <meta name="theme-color" content="#308D46" /> <meta name='robots' content='index, follow, max-image-preview:large, max-snippet:-1' /> <meta name="image" property="og:image" content="https://media.geeksforgeeks.org/wp-content/cdn-uploads/gfg_200x200-min.png"> <meta property="og:image:type" content="image/png"> <meta property="og:image:width" content="200"> <meta property="og:image:height" content="200"> <meta name="facebook-domain-verification" content="xo7t4ve2wn3ywfkjdvwbrk01pvdond" /> <meta property="og:title" content="Puzzles - GeeksforGeeks" /> <meta name="description" content="Puzzles are frequently used in exams and interviews to assess logical and analytical thinking, with various types categorized by examination patterns." /> <meta property="og:url" content="https://www.geeksforgeeks.org/puzzles/" /> <meta name="keywords" content="Analytical Puzzles, Mathematical Puzzles, Logical Puzzles, Arrangement Puzzles, Shape based Puzzles, Mechanical Puzzles, Monty Hall problem, Egg Dropping Puzzle, Water Jug Problem, Cheryl’s Birthday Puzzle, Puzzle solving strategies, Finding contaminated pills, Maximum pieces from a Circle, Splitting a Cake Puzzle, Two Creepers Climbing a Tree" /> <meta property="og:site_name" content="GeeksforGeeks" /> <meta property="og:image" content="https://media.geeksforgeeks.org/wp-content/cdn-uploads/gfg_200x200-min.png" /> <meta property="article:section" content="Puzzles" /> <meta property="article:tag" content="Tutorials" /> <meta property="og:type" content="article" /> <meta property="og:locale" content="en_US" /> <meta property="article:published_time" content="2023-11-17 11:31:17+00:00" /> <meta property="article:modified_time" content="2024-12-27 16:49:26+00:00" /> <meta property="og:updated_time" content="2024-12-27 16:49:26+00:00" /> <meta property="og:image:secure_url" content="https://media.geeksforgeeks.org/wp-content/cdn-uploads/gfg_200x200-min.png" /> <meta property="og:description" content="Puzzles are frequently used in exams and interviews to assess logical and analytical thinking, with various types categorized by examination patterns." /> <script src="https://cdnads.geeksforgeeks.org/synchronously_gfg_ads.min.js"></script> <script defer src="https://apis.google.com/js/platform.js"></script> <!-- earlier require.js --> <!-- <script src="//cdnjs.cloudflare.com/ajax/libs/require.js/2.1.14/require.min.js"></script> --> <!-- <script src="https://assets.geeksforgeeks.org/codetabs-dev/require.js"></script> --> <!-- Removed the below script from here to prevent loading google translate js at initial load <script async src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script> --> <script src="//cdnjs.cloudflare.com/ajax/libs/require.js/2.1.14/require.min.js"></script> <!-- FIXME:- To be finalised whether we need to put this gpt script in header or footer --> <!-- //gpt.js script --> <!-- <script async src='https://www.googletagservices.com/tag/js/gpt.js'></script> --> <script> var IHPWT={}; //Initialize Namespace var pbjs = pbjs || {}; pbjs.que = pbjs.que || []; var googletag = googletag || {}; googletag.cmd = googletag.cmd || []; var gptRan = false; </script> <script defer src="https://ads.pubmatic.com/AdServer/js/pwt/162080/12331/pwt.js"></script> <script defer src="https://securepubads.g.doubleclick.net/tag/js/gpt.js"></script> <script defer src="https://cdnads.geeksforgeeks.org/prebid.js?ver=0.1"></script> <script defer src="https://cdnads.geeksforgeeks.org/gfg_ads.min.js?ver=0.1"></script> <script> var quizData = JSON.parse("{}"); </script> <!-- gfg tabs compatablity bundled js --> <title>Puzzles - GeeksforGeeks</title> <link rel="profile" href="http://gmpg.org/xfn/11" /> <link rel="pingback" href="" /> <!--[if lt IE 9]> <script src="https://www.geeksforgeeks.org/wp-content/themes/iconic-one/js/html5.js" type="text/javascript"></script> <![endif]--> <!-- Video Schema for posts only --> <!-- adding article schema markup --> <!--POST SCHEMA through API--> <script type="application/ld+json"> { "@context": "https://schema.org", "@type": "Article", "mainEntityOfPage": { "@type": "WebPage", "id": "https://www.geeksforgeeks.org/puzzles/" }, "headline": "Puzzles", "datePublished": "2023-11-17 11:31:17", "dateModified": "2024-12-27 04:49:26", "image": { "@type": "ImageObject", "url": "https://media.geeksforgeeks.org/wp-content/uploads/gfg_200X200-100x100.png", "width": "100", "height": "100" }, "author": { "@type": "Organization", "name": "GeeksforGeeks", "url": "https://www.geeksforgeeks.org/", "logo": { "@type": "ImageObject", "url": "https://media.geeksforgeeks.org/wp-content/cdn-uploads/logo-new-2.svg", "width": "301", "height": "40" } }, "publisher": { "@type": "Organization", "name": "GeeksforGeeks", "url": "https://www.geeksforgeeks.org/", "logo": { "@type": "ImageObject", "url": "https://media.geeksforgeeks.org/wp-content/cdn-uploads/logo-new-2.svg", "width": "301", "height": "40" } }, "description": "Puzzles are commonly asked in exams and interviews to test logical and analytical thinking. Here is a list of most asked Puzzles divided into four categories as per examination pattern. 1. Analytical / Mathematical PuzzlesPuzzle TitleAsked in CompanyFind ages of daughtersGoogle, MicrosoftCalculate total distance traveled by beeYahoo6×6 Grid - Ways", "about": [ { "@type": "Thing", "name": "Puzzles" }, { "@type": "Thing", "name": "Tutorials" } ] }</script> <script type="application/ld+json"> { "@context": "https://schema.org", "@type": "WebSite", "name": "GeeksforGeeks", "url": "https://www.geeksforgeeks.org/", "potentialAction": { "@type": "SearchAction", "target": "https://www.geeksforgeeks.org/search/{search_term_string}/", "query-input": "required name=search_term_string" } }</script> <script type="application/ld+json"> { "@context": "https://schema.org", "@type": "Organization", "name": "GeeksforGeeks", "url": "https://www.geeksforgeeks.org/", "logo": "https://media.geeksforgeeks.org/wp-content/cdn-uploads/20200817185016/gfg_complete_logo_2x-min.png", "description": "A computer science portal for geeks. It contains well written, well thought and well explained computer science and programming articles, quizzes and practice/competitive programming/company interview Questions.", "founder": [ { "@type": "Person", "name": "Sandeep Jain", "url": "https://in.linkedin.com/in/sandeep-jain-b3940815" } ], "sameAs": [ "https://www.facebook.com/geeksforgeeks.org/", "https://twitter.com/geeksforgeeks", "https://www.linkedin.com/company/1299009", "https://www.youtube.com/geeksforgeeksvideos/" ] }</script> <script> var arrPostCat = new Array(); var arrPostCatName="Puzzles"; arrPostCat.push('2063'); var tIds = "2063,6527"; var termsNames = "Puzzles,Tutorials"; var tIdsInclusiveParents = "2063,6527"; var domain = 1; var arrPost = new Array(); var post_id = "1096380"; var post_type = "post"; var post_slug = window.location.href; var ip = "64.252.73.144"; var post_title = `Puzzles`; var post_status = "publish"; var practiceAPIURL="https://practiceapi.geeksforgeeks.org/"; var practiceURL="https://practice.geeksforgeeks.org/"; var post_date = "2023-11-17 10:55:08"; var commentSysUrl = "https://discuss.geeksforgeeks.org/commentEmbedV2.js"; //var postAdApiUrlString = ""; var link_on_code_run = ''; var link_search_modal_top = ''; var country_code_cf = "ES"; var postAdApiUrlString = '2063/6527/'; </script> <!-- This site is optimized with the Yoast SEO plugin v7.6 - https://yoast.com/wordpress/plugins/seo/ --> <link rel="canonical" href="https://www.geeksforgeeks.org/puzzles/" /> <script type='application/ld+json'>{"@context":"https:\/\/schema.org","@type":"Organization","url":"https:\/\/www.geeksforgeeks.org\/","sameAs":[],"@id":"https:\/\/www.geeksforgeeks.org\/#organization","name":"GeeksforGeeks","logo":"http:\/\/www.geeksforgeeks.org\/wp-content\/uploads\/gfg_200X200-1.png"}</script> <!-- / Yoast SEO plugin. --> <link rel='dns-prefetch' href='//cdn.geeksforgeeks.org' /> <link rel='dns-prefetch' href='//s.w.org' /> <script type="text/javascript"> window._wpemojiSettings = {"baseUrl":"https:\/\/s.w.org\/images\/core\/emoji\/11\/72x72\/","ext":".png","svgUrl":"https:\/\/s.w.org\/images\/core\/emoji\/11\/svg\/","svgExt":".svg","source":{"concatemoji":"https:\/\/www.geeksforgeeks.org\/wp-includes\/js\/wp-emoji-release.min.js?ver=4.9.8"}}; !function(a,b,c){function d(a,b){var c=String.fromCharCode;l.clearRect(0,0,k.width,k.height),l.fillText(c.apply(this,a),0,0);var d=k.toDataURL();l.clearRect(0,0,k.width,k.height),l.fillText(c.apply(this,b),0,0);var e=k.toDataURL();return d===e}function e(a){var b;if(!l||!l.fillText)return!1;switch(l.textBaseline="top",l.font="600 32px Arial",a){case"flag":return!(b=d([55356,56826,55356,56819],[55356,56826,8203,55356,56819]))&&(b=d([55356,57332,56128,56423,56128,56418,56128,56421,56128,56430,56128,56423,56128,56447],[55356,57332,8203,56128,56423,8203,56128,56418,8203,56128,56421,8203,56128,56430,8203,56128,56423,8203,56128,56447]),!b);case"emoji":return b=d([55358,56760,9792,65039],[55358,56760,8203,9792,65039]),!b}return!1}function f(a){var c=b.createElement("script");c.src=a,c.defer=c.type="text/javascript",b.getElementsByTagName("head")[0].appendChild(c)}var g,h,i,j,k=b.createElement("canvas"),l=k.getContext&&k.getContext("2d");for(j=Array("flag","emoji"),c.supports={everything:!0,everythingExceptFlag:!0},i=0;i<j.length;i++)c.supports[j[i]]=e(j[i]),c.supports.everything=c.supports.everything&&c.supports[j[i]],"flag"!==j[i]&&(c.supports.everythingExceptFlag=c.supports.everythingExceptFlag&&c.supports[j[i]]);c.supports.everythingExceptFlag=c.supports.everythingExceptFlag&&!c.supports.flag,c.DOMReady=!1,c.readyCallback=function(){c.DOMReady=!0},c.supports.everything||(h=function(){c.readyCallback()},b.addEventListener?(b.addEventListener("DOMContentLoaded",h,!1),a.addEventListener("load",h,!1)):(a.attachEvent("onload",h),b.attachEvent("onreadystatechange",function(){"complete"===b.readyState&&c.readyCallback()})),g=c.source||{},g.concatemoji?f(g.concatemoji):g.wpemoji&&g.twemoji&&(f(g.twemoji),f(g.wpemoji)))}(window,document,window._wpemojiSettings); </script> <style type="text/css"> img.wp-smiley, img.emoji { display: inline !important; border: none !important; box-shadow: none !important; height: 1em !important; width: 1em !important; margin: 0 .07em !important; vertical-align: -0.1em !important; background: none !important; padding: 0 !important; } </style> <link rel='stylesheet' id='custom-style-css' href='https://www.geeksforgeeks.org/wp-content/themes/iconic-one/css/gfg.min.css?ver=11.88' type='text/css' media='all' /> <script type='text/javascript' src='https://code.jquery.com/jquery-3.7.1.min.js?ver=3.7.1'></script> <script type='text/javascript' src='https://code.jquery.com/jquery-migrate-3.5.2.min.js?ver=3.5.2'></script> <script type='text/javascript'> /* <![CDATA[ */ var gfgObject = {"authUrl":"https:\/\/auth.geeksforgeeks.org\/","writeApiUrl":"https:\/\/apiwrite.geeksforgeeks.org\/","writeUrl":"https:\/\/write.geeksforgeeks.org\/","utilUrl":"https:\/\/util.geeksforgeeks.org\/","apiUrl":"https:\/\/api.geeksforgeeks.org\/","cfApiUrl":"https:\/\/gfgapi.geeksforgeeks.org\/","baseCompilerURL":"https:\/\/codejudge.geeksforgeeks.org\/","idePageBaseUrl":"https:\/\/ide.geeksforgeeks.org\/","gfgApiScriptUrl":"https:\/\/apiscript.geeksforgeeks.org\/","gfgSiteUrl":"https:\/\/www.geeksforgeeks.org\/","curatedListId":"1","curatedListTitle":"SDE Sheet Problems","utilDjangoCfUrl":"https:\/\/utilapi.geeksforgeeks.org\/","premiumCheckoutSlug":"premium-plans-payment\/","premiumLandingSlug":"premium-plans\/","premiumCssUrl":"https:\/\/www.geeksforgeeks.org\/wp-content\/themes\/iconic-one\/css\/gfgpremium.min.css?ver=1.6","premiumJsUrl":"https:\/\/www.geeksforgeeks.org\/wp-content\/themes\/iconic-one\/js\/gfgpremium.min.js?ver=1.5","utilGoogleUrl":"https:\/\/ugprod.geeksforgeeks.org\/","communityApiUrl":"https:\/\/communityapi.geeksforgeeks.org\/","utilDjangoUrl":"https:\/\/gfgutil.geeksforgeeks.org\/","gfgPracticeUrl":"https:\/\/practiceapi.geeksforgeeks.org\/","gfgMediaUrl":"https:\/\/media.geeksforgeeks.org\/","authDjangoApiUrl":"https:\/\/authapi.geeksforgeeks.org\/","gfgMlApiUrl":"https:\/\/recommendations.geeksforgeeks.org\/","is_home":"","is_category":"","userlevelPremiumPlus":"2","practiceUrl":"https:\/\/practice.geeksforgeeks.org\/","gfgNotificationsApiUrl":"https:\/\/notificationsapi.geeksforgeeks.org\/"}; /* ]]> */ </script> <script type='text/javascript' async="async" src='https://www.geeksforgeeks.org/wp-content/themes/iconic-one/js/gfg.min.js?ver=13.62'></script> <link rel='shortlink' href='https://www.geeksforgeeks.org/?p=1096380' /> <style> #wpadminbar{ background: #ff0000 !important; } </style> <style type="text/css" id="custom-background-css"> body.custom-background { background-color: #ffffff; } </style> <link rel="icon" href="https://www.geeksforgeeks.org/wp-content/uploads/gfg_200X200-100x100.png" sizes="32x32" /> <link rel="icon" href="https://www.geeksforgeeks.org/wp-content/uploads/gfg_200X200.png" sizes="192x192" /> <link rel="apple-touch-icon-precomposed" href="https://www.geeksforgeeks.org/wp-content/uploads/gfg_200X200.png" /> <meta name="msapplication-TileImage" content="https://www.geeksforgeeks.org/wp-content/uploads/gfg_200X200.png" /> <!-- <script type='text/javascript'> var googletag = googletag || {}; googletag.cmd = googletag.cmd || []; (function() { var gads = document.createElement('script'); gads.async = true; gads.type = 'text/javascript'; var useSSL = 'https:' == document.location.protocol; gads.src = (useSSL ? 'https:' : 'http:') + '//www.googletagservices.com/tag/js/gpt.js'; var node = document.getElementsByTagName('script')[0]; node.parentNode.insertBefore(gads, node); })(); </script> AutoAds <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <script> (adsbygoogle = window.adsbygoogle || []).push({ google_ad_client: "ca-pub-9465609616171866", enable_page_level_ads: true }); </script> --> <style> #internal-promo-section{ display: none !important; } @media screen and (max-width:1500px) and (min-width:1280px){ body.single .article-page_flex .leftBar { flex-basis: calc(100% - 605px); max-width: calc(100% - 605px); min-width: calc(100% - 605px); } .sidebar_wrapper{ max-width: 300px; min-width: 300px; } div#secondary { min-width: 300px; max-width: 300px; } .widget-area{ padding: 0px; } .article-page_flex .rightBar{ padding: 20px 0px 0px 0px; } .article--viewer_content .a-wrapper .content { padding: 0px 10px 55px 20px; } .oinLeftbar { height: calc(100vh - 350px) !important; } } .autoLeftBar_oin_child{ height: 100% !important; } .autoLeftBar_oin_non_sticky{ height: unset !important; } .sideBar--wrap.newLeftbar > div[id^='GFG_AD_Leftsidebar_']:nth-of-type(1){ padding-top: 20px; } .sideBar--wrap.newLeftbar > div[id^='GFG_AD_Leftsidebar_']{ padding: 5px 0; } @media (max-width:1043px) and (min-width:992px) { .hide-1043992 { display: none!important; } } .mobile-header-list-item{ padding-left:30px; padding-right:10px; margin-top:5px; } .mobile-header-list{ border-bottom: 1px solid rgba(158, 158, 158, 0.3) !important; } .mobile-header-list .dropdown-title{ border-bottom: none !important; font-size: 16px!important; padding: 0px!important; padding-left: 45px!important; font-weight: normal; } .mobile-header-list .upside::after{ transform: rotate(180deg); } </style> <!-- End Google Tag Manager --> <!-- Global site tag (gtag.js) - Google Ads: 474915276 --> <!-- <script async src="https://www.googletagmanager.com/gtag/js?id=AW-474915276"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'AW-474915276'); </script> --> </head> <body class="post-template-default single single-post postid-1096380 single-format-standard custom-background custom-background-white"> <script> // Dark mode script const gfgThemeList = Object.freeze({ LIGHT: "gfgThemeLight", DARK: "gfgThemeDark" }) const getThemeFromCookie = () => { let gfg_def_theme = ""; let cookies = document.cookie; let cooks = cookies.split(";"); for (let i = 0; i < cooks.length; i++) { let icook = cooks[i].split("="); if (icook[0].trim() == "gfg_theme") { gfg_def_theme = icook[1].trim(); } } return gfg_def_theme } if(!(post_slug.includes('premium-plans-payment/') || post_slug.includes('premium-plans/'))){ var isDarkMode = getThemeFromCookie() == gfgThemeList.DARK ? true : false; document.querySelector("body").setAttribute("data-dark-mode", isDarkMode); } function setSearchBarFocus() { const myTimeout = setTimeout(searchBarFocus, 0); function searchBarFocus() { document.getElementById("gcse-search-input").focus(); } } </script> <!-- <div class="header-main__wrapper not-fixed"> --> <nav> <div class="header-main__wrapper"> <a class="gfg-stc" style="top:0" href="#main">Skip to content</a> <a href="https://www.geeksforgeeks.org/" aria-label="Logo" class="header-main__logo"> <div class="_logo"> <!-- Original Logo --> <img class="gfg_logo_img" style="height: 30px; width: 80px; max-width: fit-content;" src="https://media.geeksforgeeks.org/gfg-gg-logo.svg" alt="geeksforgeeks"> </div> </a> <div class="header-main__container"> <!-- for mobile only --> <!-- For Web view only --> <ul class="header-main__list"><li class="header-main__list-item Header_1" data-parent="false" aria-expanded="true" data-expandable="true"><span>Courses</span><i class="gfg-icon gfg-icon_arrow-down gfg-icon_header"></i><ul class="mega-dropdown Screen_1"><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/courses/dsa-to-development-coding-guide?itm_source=geeksforgeeks&itm_medium=main_header&itm_campaign=courses" target="_self">DSA to Development</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/courses/data-science-live?itm_source=geeksforgeeks&itm_medium=main_header&itm_campaign=courses" target="_self">Machine Learning & Data Science</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/courses/mastering-generative-ai-and-chat-gpt?itm_source=geeksforgeeks&itm_medium=main_header&itm_campaign=courses" target="_self">Generative AI & ChatGPT</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/courses/search?query=AWS&itm_source=geeksforgeeks&itm_medium=main_header&itm_campaign=courses" target="_self">Become AWS Certified</a></li><li class="mega-dropdown__list-item" data-parent="false" aria-expanded="true" data-expandable="true"><span>DSA Courses</span><i class="gfg-icon gfg-icon_arrow-right"></i><ul class="mega-dropdown Screen_2"><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/courses/dsa-self-paced?itm_source=geeksforgeeks&itm_medium=main_header&itm_campaign=courses" target="_self">Data Structure & Algorithm(C++/JAVA)</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/courses/Data-Structures-With-Python?itm_source=geeksforgeeks&itm_medium=main_header&itm_campaign=courses" target="_self">Data Structure & Algorithm(Python)</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/courses/data-structures-and-algorithms-in-javascript?itm_source=geeksforgeeks&itm_medium=main_header&itm_campaign=courses" target="_self">Data Structure & Algorithm(JavaScript)</a></li></ul></li><li class="mega-dropdown__list-item" data-parent="false" aria-expanded="true" data-expandable="true"><span>Programming Languages</span><i class="gfg-icon gfg-icon_arrow-right"></i><ul class="mega-dropdown Screen_2"><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/courses/cpp-programming-basic-to-advanced?itm_source=geeksforgeeks&itm_medium=main_header&itm_campaign=courses" target="_self">CPP</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/courses/Java-Programming-basic-to-advanced?itm_source=geeksforgeeks&itm_medium=main_header&itm_campaign=courses" target="_self">Java</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/courses/Python-Foundation?itm_source=geeksforgeeks&itm_medium=main_header&itm_campaign=courses" target="_self">Python</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/courses/javascript?itm_source=geeksforgeeks&itm_medium=main_header&itm_campaign=courses" target="_self">JavaScript</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/courses/c-Programming-basic-to-advanced?itm_source=geeksforgeeks&itm_medium=main_header&itm_campaign=courses" target="_self">C</a></li></ul></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/courses?itm_source=geeksforgeeks&itm_medium=main_header&itm_campaign=courses" target="_self">All Courses</a></li></ul></li><li class="header-main__list-item Header_2" data-parent="false" aria-expanded="true" data-expandable="true"><span>Tutorials</span><i class="gfg-icon gfg-icon_arrow-down gfg-icon_header"></i><ul class="mega-dropdown Screen_1"><li class="mega-dropdown__list-item" data-parent="false" aria-expanded="true" data-expandable="true"><span>Python</span><i class="gfg-icon gfg-icon_arrow-right"></i><ul class="mega-dropdown Screen_2"><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/python-programming-language-tutorial/?ref=outind" target="_self">Python Tutorial</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/python-programming-examples/?ref=outind" target="_self">Python Programs</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/python-quizzes/?ref=outind" target="_self">Python Quiz</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/python-projects-beginner-to-advanced/?ref=outind" target="_self">Python Projects</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/python-interview-questions/?ref=outind" target="_self">Python Interview Questions</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/python-data-structures-and-algorithms/?ref=outind" target="_self">Python Data Structures</a></li></ul></li><li class="mega-dropdown__list-item" data-parent="false" aria-expanded="true" data-expandable="true"><span>Java</span><i class="gfg-icon gfg-icon_arrow-right"></i><ul class="mega-dropdown Screen_2"><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/java/?ref=outind" target="_self">Java Tutorial</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/collections-in-java-2/?ref=outind" target="_self">Java Collections</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/java-8-features/?ref=outind" target="_self">Java 8 Tutorial</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/java-programming-examples/?ref=outind" target="_self">Java Programs</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/java-multiple-choice-questions/?ref=outind" target="_self">Java Quiz</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/java-projects/?ref=outind" target="_self">Java Projects</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/java-interview-questions/?ref=outind" target="_self">Java Interview Questions</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/advanced-java/?ref=outind" target="_self">Advanced Java</a></li></ul></li><li class="mega-dropdown__list-item" data-parent="false" aria-expanded="true" data-expandable="true"><span>Programming Languages</span><i class="gfg-icon gfg-icon_arrow-right"></i><ul class="mega-dropdown Screen_2"><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/javascript/?ref=outind" target="_self">JavaScript</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/c-plus-plus/?ref=outind" target="_self">C++</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/r-tutorial/?ref=outind" target="_self">R Tutorial</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/sql-tutorial/?ref=outind" target="_self">SQL</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/php-tutorial/?ref=outind" target="_self">PHP</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/csharp-programming-language/?ref=outind" target="_self">C#</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/c-programming-language/?ref=outind" target="_self">C</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/scala-programming-language/?ref=outind" target="_self">Scala</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/perl-programming-language/?ref=outind" target="_self">Perl</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/golang/?ref=outind" target="_self">Go Language</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/kotlin-programming-language/?ref=outind" target="_self">Kotlin</a></li></ul></li><li class="mega-dropdown__list-item" data-parent="false" aria-expanded="true" data-expandable="true"><a href="https://www.geeksforgeeks.org/data-structures/?ref=ghm" class="remove-anchor__decoration" target="_self" style="display: inline-flex; padding: 0;">System Design</a><i class="gfg-icon gfg-icon_arrow-right"></i><ul class="mega-dropdown Screen_2"><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/system-design-tutorial/?ref=ghm" target="_self">System Design Tutorial</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/software-design-patterns/?ref=outind" target="_self">Software Design Patterns</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/complete-roadmap-to-learn-system-design/?ref=outind" target="_self">System Design Roadmap</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/top-10-system-design-interview-questions-and-answers/?ref=outind" target="_self">Top 10 System Design Interview Questions and Answers</a></li></ul></li><li class="mega-dropdown__list-item" data-parent="false" aria-expanded="true" data-expandable="true"><span>Interview Corner</span><i class="gfg-icon gfg-icon_arrow-right"></i><ul class="mega-dropdown Screen_2"><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/company-preparation/?ref=outind" target="_self">Company Preparation</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/interview-preparation-for-software-developer/?ref=outind" target="_self">Top Topics</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://practice.geeksforgeeks.org/company-tags/?ref=outind" target="_self">Practice Company Questions</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/company-interview-corner/?ref=outind" target="_self">Interview Experiences</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/experienced-interview-experiences-company-wise/?ref=outind" target="_self">Experienced Interviews</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/internship-interview-experiences-company-wise/?ref=outind" target="_self">Internship Interviews</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/competitive-programming-a-complete-guide/?ref=outind" target="_self">Competitive Programming</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/quiz-corner-gq/?ref=outind" target="_self">Multiple Choice Quizzes</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/aptitude-questions-and-answers/?ref=outind" target="_self">Aptitude for Placements</a></li></ul></li><li class="mega-dropdown__list-item" data-parent="false" aria-expanded="true" data-expandable="true"><span>Computer Science Subjects</span><i class="gfg-icon gfg-icon_arrow-right"></i><ul class="mega-dropdown Screen_2"><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/operating-systems/?ref=outind" target="_self">Operating System</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/dbms/?ref=outind" target="_self">DBMS</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/computer-network-tutorials/?ref=outind" target="_self">Computer Networks</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/engineering-mathematics-tutorials/?ref=outind" target="_self">Engineering Mathematics</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/computer-organization-and-architecture-tutorials/?ref=outind" target="_self">Computer Organization and Architecture</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/theory-of-computation-automata-tutorials/?ref=outind" target="_self">Theory of Computation</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/compiler-design-tutorials/?ref=outind" target="_self">Compiler Design</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/digital-electronics-logic-design-tutorials/#blg/?ref=outind" target="_self">Digital Logic</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/software-engineering/?ref=outind" target="_self">Software Engineering</a></li></ul></li><li class="mega-dropdown__list-item" data-parent="false" aria-expanded="true" data-expandable="true"><span>DevOps</span><i class="gfg-icon gfg-icon_arrow-right"></i><ul class="mega-dropdown Screen_2"><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/git-tutorial/?ref=outind" target="_self">GIT</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/aws-tutorial/?ref=outind" target="_self">AWS</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/docker-tutorial/?ref=outind" target="_self">Docker</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/kubernetes-tutorial/?ref=outind" target="_self">Kubernetes</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/microsoft-azure/?ref=outind" target="_self">Microsoft Azure Tutorial</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/google-cloud-platform-tutorial/?ref=outind" target="_self">Google Cloud Platform</a></li></ul></li><li class="mega-dropdown__list-item" data-parent="false" aria-expanded="true" data-expandable="true"><span>Linux</span><i class="gfg-icon gfg-icon_arrow-right"></i><ul class="mega-dropdown Screen_2"><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/linux-tutorial/?ref=outind" target="_self">Linux Tutorial</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/linux-commands/?ref=outind" target="_self">Linux Commands A-Z</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/linux-commands-cheat-sheet/?ref=outind" target="_self">Linux Commands Cheatsheet</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/permissions-in-linux/?ref=outind" target="_self">File Permission Commands</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/beginners-guide-to-linux-system-administration/?ref=outind" target="_self">Linux System Administration</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/linux-file-system/?ref=outind" target="_self">Linux File System</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/introduction-linux-shell-shell-scripting/?ref=outind" target="_self">Linux Shell Scripting</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/network-configuration-trouble-shooting-commands-linux/?ref=outind" target="_self">Linux Networking</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/linux-interview-questions/?ref=outind" target="_self">Linux Interview Questions</a></li></ul></li><li class="mega-dropdown__list-item" data-parent="false" aria-expanded="true" data-expandable="true"><span>Software Testing</span><i class="gfg-icon gfg-icon_arrow-right"></i><ul class="mega-dropdown Screen_2"><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/software-testing-tutorial/?ref=outind" target="_self">Software Testing Tutorial</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/software-engineering/?ref=outind" target="_self">Software Engineering Tutorial</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/software-testing-interview-questions/?ref=outind" target="_self">Testing Interview Questions</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/jira-tutorial/?ref=outind" target="_self">Jira</a></li></ul></li><li class="mega-dropdown__list-item" data-parent="false" aria-expanded="true" data-expandable="true"><span>Databases</span><i class="gfg-icon gfg-icon_arrow-right"></i><ul class="mega-dropdown Screen_2"><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/dbms/?ref=outind" target="_self">DBMS Tutorial</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/sql-tutorial/?ref=outind" target="_self">SQL Tutorial</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/postgresql-tutorial/?ref=outind" target="_self">PostgreSQL Tutorial</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/mongodb-tutorial/?ref=outind" target="_self">MongoDB Tutorial</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/sql-interview-questions/?ref=outind" target="_self">SQL Interview Questions</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/mysql-interview-questions/?ref=outind" target="_self">MySQL Interview Questions</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/pl-sql-interview-questions/?ref=outind" target="_self">PL/SQL Interview Questions</a></li></ul></li><li class="mega-dropdown__list-item" data-parent="false" aria-expanded="true" data-expandable="true"><span>Android</span><i class="gfg-icon gfg-icon_arrow-right"></i><ul class="mega-dropdown Screen_2"><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/android-tutorial/?ref=outind" target="_self">Android Tutorial</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/android-studio-tutorial/?ref=outind" target="_self">Android Studio Tutorial</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/kotlin-android-tutorial/?ref=outind" target="_self">Kotlin For Android</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/android-projects-from-basic-to-advanced-level/?ref=outind" target="_self">Android Projects</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/top-50-android-interview-questions-answers-sde-i-to-sde-iii/?ref=outind" target="_self">Android Interview Questions</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/6-weeks-of-android-app-development-free-project-based-learning/?ref=outind" target="_self">6 Weeks of Android App Development</a></li></ul></li><li class="mega-dropdown__list-item" data-parent="false" aria-expanded="true" data-expandable="true"><span>Excel</span><i class="gfg-icon gfg-icon_arrow-right"></i><ul class="mega-dropdown Screen_2"><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/excel-tutorial/?ref=outind" target="_self">MS Excel Tutorial</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/introduction-to-ms-excel/?ref=outind" target="_self">Introduction to MS Excel</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/data-analysis-in-excel/?ref=outind" target="_self">Data Analysis in Excel</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/basic-excel-formulas-and-functions/?ref=outind" target="_self">Basic Excel Formulas & Functions</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/instant-data-analysis-in-advanced-excel/?ref=outind" target="_self">Data Analysis in Advanced Excel</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/workbooks-in-microsoft-excel/?ref=outind" target="_self">Workbooks</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/statistical-functions-in-excel-with-examples/?ref=outind" target="_self">Statistical Functions</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/data-visualization-in-excel/?ref=outind" target="_self">Data Visualization in Excel</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/pivot-tables-in-excel/?ref=outind" target="_self">Pivot Tables in Excel</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/working-with-excel-spreadsheets-in-python/?ref=outind" target="_self">Excel Spreadsheets in Python</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/basic-excel-shortcuts/?ref=outind" target="_self">Basic Excel Shortcuts</a></li></ul></li><li class="mega-dropdown__list-item" data-parent="false" aria-expanded="true" data-expandable="true"><span>Mathematics</span><i class="gfg-icon gfg-icon_arrow-right"></i><ul class="mega-dropdown Screen_2"><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/number-theory/?ref=outind" target="_self">Number System</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/algebra/?ref=outind" target="_self">Algebra</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/linear-algebra/?ref=outind" target="_self">Linear Algebra</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/math-trigonometry/?ref=outind" target="_self">Trigonometry</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/set-theory/?ref=outind" target="_self">Set Theory</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/statistics/?ref=outind" target="_self">Statistics</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/probability-in-maths/?ref=outind" target="_self">Probability</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/geometry/?ref=outind" target="_self">Geometry</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/mensuration/?ref=outind" target="_self">Mensuration</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/logarithms/?ref=outind" target="_self">Logarithms</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/math-calculus/?ref=outind" target="_self">Calculus</a></li></ul></li></ul></li><li class="header-main__list-item Header_3" data-parent="false" aria-expanded="true" data-expandable="true"><span>DSA</span><i class="gfg-icon gfg-icon_arrow-down gfg-icon_header"></i><ul class="mega-dropdown Screen_1"><li class="mega-dropdown__list-item" data-parent="false" aria-expanded="true" data-expandable="true"><span>Data Structures</span><i class="gfg-icon gfg-icon_arrow-right"></i><ul class="mega-dropdown Screen_2"><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/array-data-structure-guide/?ref=outind" target="_self">Arrays</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/matrix/?ref=outind" target="_self">Matrix</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/string-data-structure/?ref=outind" target="_self">Strings</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/introduction-to-linked-list-data-structure/?ref=ghm" target="_self">Linked List</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/stack-data-structure/?ref=outind" target="_self">Stack</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/queue-data-structure/?ref=outind" target="_self">Queue</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/introduction-to-tree-data-structure-and-algorithm-tutorials/?ref=outind" target="_self">Tree</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/heap-data-structure/?ref=outind" target="_self">Heap</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/hashing-data-structure/?ref=outind" target="_self">Hashing</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/graph-data-structure-and-algorithms/?ref=outind" target="_self">Graph</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/introduction-to-set-data-structure-and-algorithm-tutorials/?ref=outind" target="_self">Set Data Structure</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/introduction-to-map-data-structure-and-algorithm-tutorials/?ref=outind" target="_self">Map Data Structure</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/advanced-data-structures/?ref=outind" target="_self">Advanced Data Structure</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/introduction-to-data-structures/?ref=outind" target="_self">Data Structures Tutorial</a></li></ul></li><li class="mega-dropdown__list-item" data-parent="false" aria-expanded="true" data-expandable="true"><span>Algorithms</span><i class="gfg-icon gfg-icon_arrow-right"></i><ul class="mega-dropdown Screen_2"><li class="mega-dropdown__list-item" data-parent="false" aria-expanded="true" data-expandable="true"><span>Analysis of Algorithms</span><i class="gfg-icon gfg-icon_arrow-right"></i><ul class="mega-dropdown Screen_3"><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/design-and-analysis-of-algorithms/?ref=outind" target="_self">Design and Analysis of Algorithms</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/asymptotic-notation-and-analysis-based-on-input-size-of-algorithms/?ref=outind" target="_self">Asymptotic Analysis</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/types-of-asymptotic-notations-in-complexity-analysis-of-algorithms/?ref=outind" target="_self">Asymptotic Notations</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/worst-average-and-best-case-analysis-of-algorithms/?ref=outind" target="_self">Worst, Average and Best Cases</a></li></ul></li><li class="mega-dropdown__list-item" data-parent="false" aria-expanded="true" data-expandable="true"><span>Searching Algorithms</span><i class="gfg-icon gfg-icon_arrow-right"></i><ul class="mega-dropdown Screen_3"><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/linear-search/?ref=outind" target="_self">Linear Search</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/binary-search/?ref=outind" target="_self">Binary Search</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/searching-algorithms/?ref=outind" target="_self">Searching Algorithms Tutorial</a></li></ul></li><li class="mega-dropdown__list-item" data-parent="false" aria-expanded="true" data-expandable="true"><span>Sorting Algorithms</span><i class="gfg-icon gfg-icon_arrow-right"></i><ul class="mega-dropdown Screen_3"><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/selection-sort/?ref=outind" target="_self">Selection Sort</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/bubble-sort/?ref=outind" target="_self">Bubble Sort</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/insertion-sort/?ref=outind" target="_self">Insertion Sort</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/merge-sort/?ref=outind" target="_self">Merge Sort</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/quick-sort/?ref=outind" target="_self">Quick Sort</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/heap-sort/?ref=outind" target="_self">Heap Sort</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/counting-sort/?ref=outind" target="_self">Counting Sort</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/radix-sort/?ref=outind" target="_self">Radix Sort</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/bucket-sort-2/?ref=outind" target="_self">Bucket Sort</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/introduction-to-sorting-algorithm/?ref=outind" target="_self">Sorting Algorithms Tutorial</a></li></ul></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/introduction-to-greedy-algorithm-data-structures-and-algorithm-tutorials/?ref=outind" target="_self">Greedy Algorithms</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/introduction-to-dynamic-programming-data-structures-and-algorithm-tutorials/?ref=outind" target="_self">Dynamic Programming</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/introduction-to-graphs-data-structure-and-algorithm-tutorials/?ref=outind" target="_self">Graph Algorithms</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/introduction-to-pattern-searching-data-structure-and-algorithm-tutorial/?ref=outind" target="_self">Pattern Searching</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/introduction-to-recursion-data-structure-and-algorithm-tutorials/?ref=outind" target="_self">Recursion</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/introduction-to-backtracking-data-structure-and-algorithm-tutorials/?ref=outind" target="_self">Backtracking</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/introduction-to-divide-and-conquer-algorithm-data-structure-and-algorithm-tutorials/?ref=outind" target="_self">Divide and Conquer</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/mathematical-algorithms/?ref=outind" target="_self">Mathematical Algorithms</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/geometric-algorithms/?ref=outind" target="_self">Geometric Algorithms</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/introduction-to-bitwise-algorithms-data-structures-and-algorithms-tutorial/?ref=outind" target="_self">Bitwise Algorithms</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/randomized-algorithms/?ref=outind" target="_self">Randomized Algorithms</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/introduction-to-branch-and-bound-data-structures-and-algorithms-tutorial/?ref=outind" target="_self">Branch and Bound</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/introduction-to-algorithms/?ref=outind" target="_self">Algorithms Tutorial</a></li></ul></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/learn-data-structures-and-algorithms-dsa-tutorial/?ref=outind" target="_self">DSA Tutorial</a></li><li class="mega-dropdown__list-item" data-parent="false" aria-expanded="true" data-expandable="true"><span>Practice</span><i class="gfg-icon gfg-icon_arrow-right"></i><ul class="mega-dropdown Screen_2"><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/explore?page=1&sortBy=submissions&itm_source=geeksforgeeks&itm_medium=main_header_outIndia&itm_campaign=DSA_Header" target="_self">All DSA Problems</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/problem-of-the-day?itm_source=geeksforgeeksitm_source=geeksforgeeks&itm_medium=main_header_outIndia&itm_campaign=DSA_Header" target="_self">Problem of the Day</a></li><li class="mega-dropdown__list-item" data-parent="false" aria-expanded="true" data-expandable="true"><span>Company Wise Coding Practice</span><i class="gfg-icon gfg-icon_arrow-right"></i><ul class="mega-dropdown Screen_3"><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/explore?page=1&company=Amazon&sortBy=submissions&itm_source=geeksforgeeks&itm_medium=main_header_outIndia&itm_campaign=DSA_Header" target="_self">Amazon</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/explore?page=1&company=Microsoft&sortBy=submissions&itm_source=geeksforgeeks&itm_medium=main_header_outIndia&itm_campaign=DSA_Header" target="_self">Microsoft</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/explore?page=1&company=Flipkart&sortBy=submissions&itm_source=geeksforgeeks&itm_medium=main_header_outIndia&itm_campaign=DSA_Header" target="_self">Flipkart</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/explore?page=1&sortBy=submissions&itm_source=geeksforgeeks&itm_medium=main_header_outIndia&itm_campaign=DSA_Header" target="_self">Explore All</a></li></ul></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/explore?page=1&curated[]=1&sortBy=submissions&curated_names[]=SDE Sheet?itm_source=geeksforgeeks&itm_medium=main_header_outIndia&itm_campaign=DSA_Header" target="_self">GfG SDE Sheet</a></li><li class="mega-dropdown__list-item" data-parent="false" aria-expanded="true" data-expandable="true"><span>Practice Problems Difficulty Wise</span><i class="gfg-icon gfg-icon_arrow-right"></i><ul class="mega-dropdown Screen_3"><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/explore?page=1&difficulty=School&itm_source=geeksforgeeks&itm_medium=main_header_outIndia&itm_campaign=DSA_Header" target="_self">School</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/explore?page=1&difficulty=Basic&itm_source=geeksforgeeks&itm_medium=main_header_outIndia&itm_campaign=DSA_Header" target="_self">Basic</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/explore?page=1&difficulty=Easy&itm_source=geeksforgeeks&itm_medium=main_header_outIndia&itm_campaign=DSA_Header" target="_self">Easy</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/explore?page=1&difficulty=Medium&itm_source=geeksforgeeks&itm_medium=main_header_outIndia&itm_campaign=DSA_Header" target="_self">Medium</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/explore?page=1&difficulty=Hard&itm_source=geeksforgeeks&itm_medium=main_header_outIndia&itm_campaign=DSA_Header" target="_self">Hard</a></li></ul></li><li class="mega-dropdown__list-item" data-parent="false" aria-expanded="true" data-expandable="true"><span>Language Wise Coding Practice</span><i class="gfg-icon gfg-icon_arrow-right"></i><ul class="mega-dropdown Screen_3"><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/explore?page=1&category=CPP&itm_source=geeksforgeeks&itm_medium=main_header_outIndia&itm_campaign=DSA_Header" target="_self">CPP</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/explore?page=1&category=Java&itm_source=geeksforgeeks&itm_medium=main_header_outIndia&itm_campaign=DSA_Header" target="_self">Java</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/explore?category=python&itm_source=geeksforgeeks&itm_medium=main_header_outIndia&itm_campaign=DSA_Header" target="_self">Python</a></li></ul></li><li class="mega-dropdown__list-item" data-parent="false" aria-expanded="true" data-expandable="true"><span>Curated DSA Lists</span><i class="gfg-icon gfg-icon_arrow-right"></i><ul class="mega-dropdown Screen_3"><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/explore?page=1&sprint=ca8ae412173dbd8346c26a0295d098fd&sortBy=submissions&sprint_name=Beginner's DSA Sheet&itm_source=geeksforgeeks&itm_medium=main_header_outIndia&itm_campaign=DSA_Header" target="_self">Beginner's DSA Sheet</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/explore?page=1&sprint=50746f92a895c22a50504ac0c1fb9c84&sortBy=submissions&sprint_name=Top 50 Array Problems&itm_source=geeksforgeeks&itm_medium=main_header_outIndia&itm_campaign=DSA_Header" target="_self">Top 50 Array Problems</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/explore?page=1&sprint=57184072610b884e5df3584cc534115d&sortBy=submissions&sprint_name=Top 50 String Problems&itm_source=geeksforgeeks&itm_medium=main_header_outIndia&itm_campaign=DSA_Header" target="_self">Top 50 String Problems</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/explore?page=1&sprint=93d672753b74440c7427214c8ebf866d&sortBy=submissions&sprint_name=Top 50 DP Problems&itm_source=geeksforgeeks&itm_medium=main_header_outIndia&itm_campaign=DSA_Header" target="_self">Top 50 DP Problems</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/explore?page=1&sprint=405e9db0f353691ad3b2d546b19145e9&sortBy=submissions&sprint_name=Top 50 Graph Problems&itm_source=geeksforgeeks&itm_medium=main_header_outIndia&itm_campaign=DSA_Header" target="_self">Top 50 Graph Problems</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/explore?page=1&sprint=5f24de84b65bf7c4f4399c8111e26b81&sortBy=submissions&sprint_name=Top 50 Tree Problems&itm_source=geeksforgeeks&itm_medium=main_header_outIndia&itm_campaign=DSA_Header" target="_self">Top 50 Tree Problems</a></li></ul></li></ul></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/competitive-programming-a-complete-guide/?ref=outind" target="_self">Competitive Programming</a></li><li class="mega-dropdown__list-item" data-parent="false" aria-expanded="true" data-expandable="true"><span>Company Wise SDE Sheets</span><i class="gfg-icon gfg-icon_arrow-right"></i><ul class="mega-dropdown Screen_2"><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/facebookmeta-sde-sheet-interview-questions-and-answers/?ref=outind" target="_self">Facebook SDE Sheet</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/amazon-sde-sheet-interview-questions-and-answers/?ref=outind" target="_self">Amazon SDE Sheet</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/apple-sde-sheet-interview-questions-and-answers/?ref=outind" target="_self">Apple SDE Sheet</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/netflix-sde-sheet-interview-questions-and-answers/?ref=outind" target="_self">Netflix SDE Sheet</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/google-sde-sheet-interview-questions-and-answers/?ref=outind" target="_self">Google SDE Sheet</a></li></ul></li><li class="mega-dropdown__list-item" data-parent="false" aria-expanded="true" data-expandable="true"><span>DSA Cheat Sheets</span><i class="gfg-icon gfg-icon_arrow-right"></i><ul class="mega-dropdown Screen_2"><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/sde-sheet-a-complete-guide-for-sde-preparation/?ref=outind" target="_self">SDE Sheet</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/most-asked-dsa-interview-problems-for-beginners/?ref=outind" target="_self">DSA Sheet for Beginners</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/must-do-coding-questions-for-companies-like-amazon-microsoft-adobe/?ref=outind" target="_self">FAANG Coding Sheet</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/must-do-coding-questions-for-product-based-companies/?ref=outind" target="_self">Product-Based Coding Sheet</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/must-coding-questions-company-wise/?ref=outind" target="_self">Company-Wise Preparation Sheet</a></li></ul></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/top-100-data-structure-and-algorithms-dsa-interview-questions-topic-wise/?ref=outind" target="_self">Top Interview Questions</a></li><li class="mega-dropdown__list-item" data-parent="false" aria-expanded="true" data-expandable="true"><span>Puzzles</span><i class="gfg-icon gfg-icon_arrow-right"></i><ul class="mega-dropdown Screen_2"><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/puzzles/?ref=outind" target="_self">All Puzzles</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/top-100-puzzles-asked-in-interviews/?ref=outind" target="_self">Top 100 Puzzles Asked In Interviews</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/top-20-puzzles-commonly-asked-during-sde-interviews/?ref=outind" target="_self">Top 20 Puzzles Commonly Asked During SDE Interviews</a></li></ul></li></ul></li><li class="header-main__list-item Header_4" data-parent="false" aria-expanded="true" data-expandable="true"><span>Data Science</span><i class="gfg-icon gfg-icon_arrow-down gfg-icon_header"></i><ul class="mega-dropdown Screen_1"><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/python-programming-language/?ref=outind" target="_self">Python Tutorial</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/r-tutorial/?ref=outind" target="_self">R Tutorial</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/machine-learning/?ref=outind" target="_self">Machine Learning</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/data-science-with-python-tutorial/?ref=outind" target="_self">Data Science using Python</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/r-programming-for-data-science/?ref=outind" target="_self">Data Science using R</a></li><li class="mega-dropdown__list-item" data-parent="false" aria-expanded="true" data-expandable="true"><span>Data Science Packages</span><i class="gfg-icon gfg-icon_arrow-right"></i><ul class="mega-dropdown Screen_2"><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/pandas-tutorial/?ref=outind" target="_self">Pandas Tutorial</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/numpy-tutorial/?ref=outind" target="_self">NumPy Tutorial</a></li></ul></li><li class="mega-dropdown__list-item" data-parent="false" aria-expanded="true" data-expandable="true"><span>Data Visualization</span><i class="gfg-icon gfg-icon_arrow-right"></i><ul class="mega-dropdown Screen_2"><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/python-data-visualization-tutorial/?ref=outind" target="_self">Python Data Visualization Tutorial</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/data-visualization-in-r/?ref=outind" target="_self">Data Visualization with R</a></li></ul></li><li class="mega-dropdown__list-item" data-parent="false" aria-expanded="true" data-expandable="true"><span>Data Analysis</span><i class="gfg-icon gfg-icon_arrow-right"></i><ul class="mega-dropdown Screen_2"><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/data-analysis-with-python/?ref=outind" target="_self">Data Analysis with Python</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/data-analysis-using-r/?ref=outind" target="_self">Data Analysis with R</a></li></ul></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/deep-learning-tutorial/?ref=outind" target="_self">Deep Learning</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/natural-language-processing-nlp-tutorial/?ref=outind" target="_self">NLP Tutorial</a></li></ul></li><li class="header-main__list-item Header_5" data-parent="false" aria-expanded="true" data-expandable="true"><span>Web Tech</span><i class="gfg-icon gfg-icon_arrow-down gfg-icon_header"></i><ul class="mega-dropdown Screen_1"><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/html-tutorial/?ref=outind" target="_self">HTML Tutorial</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/css-tutorial/?ref=outind" target="_self">CSS Tutorial</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/javascript/?ref=outind" target="_self">JavaScript Tutorial</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/php-tutorial/?ref=outind" target="_self">PHP Tutorial</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/react-tutorial/?ref=outind" target="_self">ReactJS Tutorial</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/nodejs/?ref=outind" target="_self">NodeJS Tutorial</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/bootstrap/?ref=outind" target="_self">Bootstrap Tutorial</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/typescript/?ref=outind" target="_self">Typescript</a></li><li class="mega-dropdown__list-item" data-parent="false" aria-expanded="true" data-expandable="true"><span>Web Development Using Python</span><i class="gfg-icon gfg-icon_arrow-right"></i><ul class="mega-dropdown Screen_2"><li class="mega-dropdown__list-item" data-parent="false" aria-expanded="true" data-expandable="true"><span>Django</span><i class="gfg-icon gfg-icon_arrow-right"></i><ul class="mega-dropdown Screen_3"><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/django-tutorial/?ref=outind" target="_self">Django Tutorial</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/top-django-projects-for-beginners/?ref=outind" target="_self">Django Projects</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/django-interview-questions/?ref=outind" target="_self">Django Interview Questions</a></li></ul></li><li class="mega-dropdown__list-item" data-parent="false" aria-expanded="true" data-expandable="true"><span>Flask</span><i class="gfg-icon gfg-icon_arrow-right"></i><ul class="mega-dropdown Screen_3"><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/flask-tutorial/?ref=outind" target="_self">Flask Tutorial</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/flask-projects/?ref=outind" target="_self">Flask Projects</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/flask-interview-questions-and-answers/?ref=outind" target="_self">Flask Interview Questions</a></li></ul></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/postman-tutorial/?ref=outind" target="_self">Postman</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/introduction-to-github/?ref=outind" target="_self">Github</a></li></ul></li><li class="mega-dropdown__list-item" data-parent="false" aria-expanded="true" data-expandable="true"><span>Cheat Sheets</span><i class="gfg-icon gfg-icon_arrow-right"></i><ul class="mega-dropdown Screen_2"><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/html-cheat-sheet-a-basic-guide-to-html/?ref=outind" target="_self">HTML Cheat Sheet</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/css-cheat-sheet-a-basic-guide-to-css/?ref=outind" target="_self">CSS Cheat Sheet</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/javascript-cheat-sheet-a-basic-guide-to-javascript/?ref=outind" target="_self">JavaScript Cheat Sheet</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/react-cheat-sheet/?ref=outind" target="_self">React Cheat Sheet</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/angular-cheat-sheet-a-basic-guide-to-angular/?ref=outind" target="_self">Angular Cheat Sheet</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/jquery-cheat-sheet-a-basic-guide-to-jquery/?ref=outind" target="_self">jQuery Cheat Sheet</a></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/bootstrap-cheatsheet-a-basic-guide-to-bootstrap/?ref=outind" target="_self">Bootstrap Cheat Sheet</a></li></ul></li><li class="mega-dropdown__list-item" data-child="true" aria-expanded="false" data-expandable="false"><a href="https://www.geeksforgeeks.org/web-development/?ref=outind" target="_self">Learn Complete Web Development</a></li></ul></li></ul> <!-- right now only search is visible for mobile view because of css and all are visible for web view --> <ul class="header-main__left-list" data-nl="false"> <li class="header-main__left-list-item gcse-search_li p-relative" aria-expanded="false" data-expandable="false"> <div class="gcse-form-search-suggestion_wrapper"> <form id="gcse-form" class="gcse-form_class p-relative closeChatScreen" data-sm="false"> <span class="front-search-icon"><i class="gfg-icon gfg-icon_search gfg-icon_white gcse-search__icon gcse-search-icon_grey"></i> </span> <input class="gcse-search-input__wrapper" id="gcse-search-input" aria-expanded="false" placeholder="Search..." autocomplete="off" /> <i class="gfg-icon gfg-icon_times gfg-icon_white hide-search"></i> <button aria-label="search" type="submit" class="gcse-search__btn not-expanded"> <i class="gfg-icon gfg-icon_search gfg-icon_white gcse-search__icon"></i> </button> </form> <div class="gfg-search-suggestion_wrapper" style="display:none"></div> <div> </li> <li> <div class="darkMode-wrap" data-mode="Switch to Dark Mode"> <button aria-label="toggle theme" data-gfg-action="toggleGFGTheme"> <div id="darkMode-wrap-red-dot" style="height:12px;width:12px;background-color:#EB2222;border-radius:999999px;position:absolute;top:4px;right:0;display:none;"></div> <i class="gfg-icon gfg-icon_dark-mode"></i> </button> <span id="darkModeTooltipText"></span> </div> </li> <li class="header-main__left-list-item google-translate-parent-element" aria-expanded="false" data-expanded="true"> <div class="translate" id="g_translater"> <div id="google_translate_element" data-show="false"></div> </div> <i class ="gfg-icon gfg-icon_translate googleTranslateToggle" data-gfg-action="google_translate_element"></i> <!-- removed below code from here to load google translate js dynamically --> <!-- <script> var m = false; function googleTranslateElementInit() { new google.translate.TranslateElement({pageLanguage: 'en'}, 'google_translate_element'); setTimeout(function(){ if (jQuery( window ).width() < 768){ m = true; jQuery('#g_translater').detach().appendTo('#google_translate_mobile'); } }, 7000); } jQuery( window ).resize(function() { if (jQuery( window ).width() < 768 && m == false){ m = true; jQuery('#g_translater').detach().appendTo('#google_translate_mobile'); } else if (jQuery( window ).width() >= 768 && m == true){ m = false; jQuery('#g_translater').detach().prependTo('.google-translate-parent-element'); } }); </script> --> </li> <li id="userProfileId" class="header-main__left-list-item p-relative" aria-expanded="false" data-expandable="false"> <!-- Profile Section to be added via JS --> </li> </ul> </div> <!-- for mobile only --> <!-- for mobile only --> </div> </nav> <div class="header-main__slider"> <button aria-label="sub header slider previous" class="header-main__slider-arrow previous hideIt"> <i class="gfg-icon gfg-icon_arrow-left gicon-centered"></i> </button> <!-- main content for leftbar --> <ul id="hslider"> <li><a href="https://www.geeksforgeeks.org/puzzles/?ref=shm">Puzzles</a></li><li><a href="https://www.geeksforgeeks.org/20-challenging-brain-teasers-with-answers/?ref=shm">Brain Teasers</a></li><li><a href="https://www.geeksforgeeks.org/35-christmas-riddles-with-answers/?ref=shm">Christmas Riddles</a></li><li><a href="https://www.geeksforgeeks.org/35-funny-riddles-with-answers/?ref=shm">Funny Riddles</a></li><li><a href="https://www.geeksforgeeks.org/interesting-riddles/?ref=shm">Interesting Riddles</a></li><li><a href="https://www.geeksforgeeks.org/35-mathematical-riddles-with-answers/?ref=shm">Mathematical Riddles</a></li><li><a href="https://www.geeksforgeeks.org/35-animal-riddles-with-answers/?ref=shm">Animal Riddles</a></li><li><a href="https://www.geeksforgeeks.org/what-are-logical-puzzles-and-how-to-solve-them/?ref=shm">Logical Puzzles</a></li><li><a href="https://www.geeksforgeeks.org/what-are-mathematical-puzzles-and-how-to-solve-them/?ref=shm">Mathematical Puzzles</a></li><li><a href="https://www.geeksforgeeks.org/algorithm-to-solve-rubiks-cube/?ref=shm">Rubik's Cube</a></li><li><a href="https://www.geeksforgeeks.org/tag/aptitude-puzzles/?ref=shm">Aptitude-Puzzles</a></li><li><a href="https://www.geeksforgeeks.org/top-100-puzzles-asked-in-interviews/?ref=shm">Top 100 Puzzles</a></li><li><a href="https://www.geeksforgeeks.org/top-mcqs-on-puzzles-with-answers/?ref=shm">Puzzles Quiz</a></li> </ul> <button aria-label="sub header slider next" class="header-main__slider-arrow next hideIt"> <i class="gfg-icon gfg-icon_arrow-right gicon-centered"></i> </button> </div> <button id="scrollTopBtn" title="Scroll to Top" type="button" class="btn btn-success">▲</button> <!-- .top-spacing to give space on single pages--> <div id="main" class="wrapper single-page"> <script> if(post_slug.includes('premium-plans-payment/') || post_slug.includes('premium-plans/')){ $(".header-main__slider").remove(); } //getting tags for the page type data let mobileView = false; let pageTags = JSON.parse('null'); let allTags = JSON.parse('["Puzzles","Tutorials"]'); </script> <script> window.have_dsa_term = false; // var practiceTab = ; </script> <style> .wrapper { flex-direction: column !important; } /* spinner css */ @keyframes spinner { to {transform: rotate(360deg);} } .spinner:before { content: ''; box-sizing: border-box; position: absolute; top: 50%; left: 50%; width: 20px; height: 20px; margin-top: -10px; margin-left: -10px; border-radius: 50%; border: 2px solid #ccc; border-top-color: #000; animation: spinner .6s linear infinite; } .report-loader{ position: relative; } .report-loader.spinner{ margin-left: 16px; } .badges{ display: flex; align-items: center; position: relative; } .badges .gfg-badge-icon.md::after{ transform: scale(0.25); position:relative; top: 2px; left: -2px; } .sep{ margin: 0px 5px; font-size: 20px; color: var(--badge-name-color); } .pub-count{ font-size: 14px; font-family: var(--font-secondary); } .badge-details{ display:none; } .badges{ cursor: pointer; position: relative; /* width: 0px; height: 20px; top: -32px; */ } .badge-icon{ display: flex; align-items: center; } .badge-content{ margin-left: 9px; } .badge-name{ color: var(--badge-nam-color); font-weight: 600; font-size: 16px; text-transform: capitalize; } .badge-data{ color: #A5A4A4; font-size: 10px; } .badges:hover .badge-details{ display: block; background: var(--badge-bg); padding: 10px 18px 10px 18px; position: absolute; width: 175px; top: -10px; z-index: 10; left: 112%; box-shadow: rgb(100 100 111 / 20%) 0px 7px 29px 0px; border-radius: 5px; /* transform-origin: top right; */ } .badge-details::before { content: ""; position: absolute; transform: rotate(90deg); /* transform-origin: right; */ left: -6px; top: 50%; margin-left: -17px; border-width: 12px; border-style: solid; border-color: var(--badge-bg) transparent transparent transparent; margin-top: -12px; } .badge-icon .icon{ border: 1px solid var(--icon-border-color); padding: 4px 3px; border-radius: 4px; width: 22px; height: 24px; position: relative; } .b-icon-pos{ position: relative; top: -34px; left: -34px; } /* article viewer */ .article--viewer .a-wrapper{ margin-top: 0px !important; } .content{ padding-top: 10px !important; } .u-name{ font-size: 14px; } .article--viewer_content .a-wrapper .content{ padding-bottom: 10px !important; } .likeTooltipBottom{ font-size: 14px; } @media (max-width: 434px) { .article-buttons.show-bg{ margin-top: 56px !important; } } @media (max-width: 730px), ((min-width: 992px) and (max-width:1100px)) { .article--viewer .media{ position: relative; } .article--viewer .media{ margin-bottom: 0px !important; } .badges:hover .badge-details{ top: -56px; left: 62px; } .badge-details::before{ transform: rotate(0deg); left: 10%; top: 117%; } .article-buttons.show-bg{ margin-top: 22px; top: 0px !important; } } @media ((min-width:731px) and (max-width:1223px)) { .article-buttons.show-bg{ top: 18px; } } @media ((min-width:993px) and (max-width:1190px)) { .article--viewer .media{ position: relative; } .article--viewer .media{ margin-bottom: 25px !important; } } </style> <!-- Survey modal implementation --> <script> function getCookie(name) { function escape(s) { return s.replace(/([.*+?\^$(){}|\[\]\/\\])/g, '\\$1'); } var match = document.cookie.match(RegExp('(?:^|;\\s*)' + escape(name) + '=([^;]*)')); return match ? match[1] : null; } </script> <!-- END Survey modal implementation--> <!-- Open in App Button and CSS--> <!-- Above code is for old openInApp pop-up with open in app and continue buttons--> <div id='openInApp-modal' class='openInApp'> <a href = 'https://geeksforgeeksapp.page.link/?link=https://www.geeksforgeeks.org/puzzles/?type%3Darticle%26id%3D1096380&apn=free.programming.programming&isi=1641848816&ibi=org.geeksforgeeks.GeeksforGeeksDev&efr=1' class='openInAppLink'> <span style='color: #fff;'>Open In App</span> </a> </div> <script> var consentValue = localStorage.getItem("gfg_cc"); var isIOS = !!navigator.platform && /iPad|iPhone|iPod|MacIntel/.test(navigator.platform) && navigator.maxTouchPoints > 0; const isSafari = navigator.userAgent.indexOf("Safari") > -1; const isMozilla = navigator.userAgent.indexOf("Mozilla") > -1; if(consentValue){ if(window.innerHeight > window.innerWidth && navigator.maxTouchPoints > 1 && (isSafari || isMozilla || navigator.userAgentData.mobile)){ $('.openInApp').css({ display: "block" }); $('#scrollTopBtn').css({ bottom: "44px" }); //adding a new class to check stats for clicks on iOS and Android isIOS ? jQuery('.openInAppLink').addClass("oia-iOS") : $('.openInAppLink').addClass("oia-android"); //for openInApp Link } } </script> <style> .openInApp{ display: none; bottom: 0px; width: 100%; position: fixed; z-index: 1025; opacity: 0.93; } .openInAppLink{ height: 44px; background: var(--color-gfg); font-weight: bold; display: block; text-align: center; padding: 12px; font-size: large; } .openInAppLink, .openInAppLink:hover, .openInAppLink:active, .openInAppLink:visited, .openInAppLink:focus { text-decoration:none; } </style> <!-- END Open in App Button and CSS--> <div class="container-fluid bg-light" id="home-page" style="position: relative; max-width:100%;"> <div class="article-page_flex"> <div class="sidebar_wrapper manual_leftbar "> <a href="https://www.geeksforgeeks.org/puzzle-1-how-to-measure-45-minutes-using-two-identical-wires/?ref=next_article_top" class="next_article_leftbar_container"> <div class="next_article_leftbar_content"> <span class="next_article_text">Next Article:</span> <div class="next_article_title">Puzzle 1 | (How to Measure 45 minutes using two identical wires?)</div> </div> <img src="https://media.geeksforgeeks.org/auth-dashboard-uploads/ep_right.svg" alt="Next article icon" /> </a> <div class="sideBar " style="height: unset !important"> <!-- <div class="sideBar--wrap newLeftbar oinLeftbar "> --> <div class="sideBar--wrap newLeftbar "> <div id="GFG_AD_Leftsidebar_300x250_chained_1"></div> <div id="GFG_AD_Leftsidebar_300x250_chained_2"></div> <div id="GFG_AD_Leftsidebar_300x250_chained_3"></div> <div id="GFG_AD_Leftsidebar_300x600_chained_1"></div> </div> </div> <div id="GFG_AD_Desktop_LeftSideBar_Docked_160x600" style="max-width:160px; max-height:600px"></div> </div> <div class="leftBar"> <div class="article--viewer"> <div class="article--viewer_content"> <div class="a-wrapper"> <div class="" style="z-index:9999 !important;position:relative;"> </div> <article class="content post-1096380 post type-post status-publish format-standard hentry category-puzzles tag-tutorials" id="post-1096380"> <!-- when comment system will be scalable from practice side then we will display Article/Discussion tab--> <div class="main_wrapper" style="display:flex;"> <div style="width: 100%;"> <div class="article-title"> <h1>Puzzles</h1> </div> <div class="last_updated_parent"> <div> <span class="strong">Last Updated : </span> <span>27 Dec, 2024</span> </div> <!-- three dot menu --> <div class="three_dot_dropdown"> <div style="display: flex;"> <div pid="1096380" ptitle="Puzzles" class="top-summary-icon-div "> <div class="three_dot_dropdown_div tooltip"> <span class="summary_tooltiptext">Summarize</span> <div class="summarize_header"> <i class= "summary_button" style="position: relative;"></i> </div> </div> </div> <div pid="1096380" ptitle="Puzzles" class="article--viewer_comment tooltip top-comment-icon-div"> <span class="comment_tooltiptext">Comments</span> <div class="three_dot_dropdown_div" data-gfg-action='loadComments'> <div class="comment_header"> <i class= "discussion_button" style="position: relative; transform: scale(0.9);"></i> </div> </div> </div> <div pid="1096380" ptitle="Puzzles" class="article--viewer_improve tooltip"> <span class="improve_tooltiptext">Improve</span> <div class="three_dot_dropdown_div three_dot_dropdown_improve" onclick="improveArticleCall()"> <div class="improve_wrapper_top"> <i class="gfg-icon gfg-icon-pencil gfg-icon_edit" style="position: relative; z-index: 3;"></i> </div> </div> <!-- <button onclick="improveArticleCall()"> <i class="gfg-icon gfg-icon_edit"></i> </button> --> </div> <!-- three dots --> <ul class="dropbtn icons btn-right showLeft" onclick="showDropdown()"> <li> </li> <li></li> <li></li> </ul> </div> </div> </div> </div> </div> <!-- menu --> <div id="myDropdown" class="three_dot_dropdown_content"> <div class="article-buttons drop" onmouseleave="closeKebabMenu()"> <!-- If the status of the summary API is true than we are showing the summarize button otherwise not --> <div pid="1096380" ptitle="Puzzles" class="improve_article--viewer tooltip"> <div class="three_dot_dropdown_div three_dot_dropdown_improve" onclick="suggestionArticleCall()" style="margin-top: 1px;"> <div class="three_dot_dropdown_inner_div improve_dot_dropdown_inner_div"> <i class="gfg-icon gfg-icon_suggest_changes gfg-icon_edit"></i> <span>Suggest changes</span> </div> </div> </div> <div pid="1096380" class="article--viewer_like tooltip"> <div class="three_dot_dropdown_div three_dot_dropdown_likearticle" onmouseleave='toggleLikeElementVisibility("showLikesContainer", false)' onmouseenter='toggleLikeElementVisibility("showLikesContainer", true)'> <div class="showLikesContainer"> <span class="likeTooltip">Like Article</span> </div> <div class="three_dot_dropdown_inner_div" data-gfg-action="like-article" data-bookmark-value="0"> <i class="gfg-icon gfg-icon_thumbs"></i> <span>Like</span> </div> </div> <!-- <button data-gfg-action="like-article" data-bookmark-value="0"> <i class="gfg-icon gfg-icon_thumbs"></i> </button> --> </div> <div pid="1096380" class="article--viewer_share tooltip"> <div class="three_dot_dropdown_div three_dot_dropdown_share" onmouseleave="closeShareModal()" onmouseenter="openShareModal()"> <div style="display: flex;align-items: center;" class="three_dot_dropdown_inner_div" data-gfg-action="share-article" data-bookmark-value="0"> <i class="gfg-share-icon"></i> <span>Share</span> </div> </div> </div> <div class="article--viewer_report tooltip"> <div class="three_dot_dropdown_div three_dot_dropdown_reportarticle"> <div class="three_dot_dropdown_inner_div" data-gfg-action="report-article" onclick="report_article();"> <i class="gfg-icon gfg-icon_report"></i> <span>Report</span> </div> </div> <!-- <button data-gfg-action="like-article" data-bookmark-value="0"> <i class="gfg-icon gfg-icon_thumbs"></i> </button> --> </div> <div class="article--viewer_Gnews tooltip"> <a class="three_dot_dropdown_inner_div Gnews_wrapper" href ='https://news.google.com/publications/CAAqBwgKMLTrzwsw44bnAw?hl=en-IN&gl=IN&ceid=IN%3Aen' target="_blank"> <img class="gfg-icon_Gnews no-zoom-in-cursor" src=https://media.geeksforgeeks.org/auth-dashboard-uploads/Google-news.svg loading="lazy" alt="News"></img> <span class='kebab_menu_news_text'>Follow</span> </a> </div> </div> </div> <div class="text"> <p dir="ltr"><span>Puzzles are commonly asked in exams and interviews to test logical and analytical thinking. Here is a list of most asked Puzzles divided into four categories as per examination pattern. </span></p><h3 id="analytical-mathematical-puzzles"><b><strong>1. Analytical / Mathematical Puzzles</strong></b></h3><table><thead><tr><th style="width: 233.333px;"><p style="text-align: center;" dir="ltr"><span>Puzzle Title</span></p></th><th style="width: 233.333px;"><p style="text-align: center;" dir="ltr"><span>Asked in Company</span></p></th></tr></thead><tbody><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-2-find-ages-of-daughters/" rel="noopener"><span>Find ages of daughters</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/google/" rel="noopener"><span>Google</span></a><span>, </span><a href="https://www.geeksforgeeks.org/companies/microsoft/" rel="noopener"><span>Microsoft</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-3-calculate-total-distance-travelled-by-bee/" rel="noopener"><span>Calculate total distance traveled by bee</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/yahoo/" rel="noopener"><span>Yahoo</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-6x6-grid-how-many-ways/" rel="noopener"><span>6×6 Grid - Ways to Reach Bottom Right</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/amazon-inc/" target="_blank" rel="noopener"><span>Amazon</span></a><span>, </span><a href="https://www.geeksforgeeks.org/companies/zoho-corporation/" rel="noopener"><span>Zoho</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-6-monty-hall-problem/" rel="noopener"><span>Monty Hall problem</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/vmware/" rel="noopener"><span>VMWare</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-18-torch-and-bridge/" rel="noopener"><span>Torch and Bridge</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/google/" rel="noopener"><span>Google</span></a><span>, </span><a href="https://www.geeksforgeeks.org/companies/microsoft/" rel="noopener"><span>Microsoft</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-set-35-2-eggs-and-100-floors/" rel="noopener"><span>2 Eggs and 100 Floors</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/vmware/" rel="noopener"><span>VMWare</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-12-maximize-probability-of-white-ball/" rel="noopener"><span>Maximize the probability of White Ball</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/amazon-inc/" target="_blank" rel="noopener"><span>Amazon</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-19-poison-and-rat/" rel="noopener"><span>Poison and Rat</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/amazon-inc/" target="_blank" rel="noopener"><span>Amazon</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-27-hourglasses-puzzle/" rel="noopener"><span>Hourglasses Puzzle</span></a></td><td style="width: 233.333px;"><span>Bank of America, </span><a href="https://www.geeksforgeeks.org/companies/yahoo/" rel="noopener"><span>Yahoo</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-17-ratio-of-boys-and-girls-in-a-country-where-people-want-only-boys/" rel="noopener"><span>The ratio of Boys and Girls in a Country where people want only boys</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/google/" rel="noopener"><span>Google</span></a><span>, </span><a href="https://www.geeksforgeeks.org/companies/goldman-sachs/" rel="noopener"><span>Goldman Sachs</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-29-car-wheel-puzzle/" rel="noopener"><span>Car Wheel Puzzle</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/makemytrip/" rel="noopener"><span>MakeMytrip</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-22-maximum-chocolates/" rel="noopener"><span>Maximum Chocolates</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/infosys/" rel="noopener"><span>Infosys</span></a><span>, </span><a href="https://www.geeksforgeeks.org/companies/makemytrip/" rel="noopener"><span>MakeMytrip</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-splitting-a-cake-with-a-missing-piece-in-two-equal-portion/" rel="noopener"><span>Puzzle | Splitting a Cake with a Missing Piece in two equal portion</span></a></td><td style="width: 233.333px;"><span>Alcatel-Lucent, </span><a href="https://www.geeksforgeeks.org/companies/cognizant/" rel="noopener"><span>Cognizant</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-33-rs-500-note-puzzle/" rel="noopener"><span>Rs 500 Note Puzzle</span></a></td><td style="width: 233.333px;"><span>CAT, </span><a href="https://www.geeksforgeeks.org/category/upsc/" rel="noopener"><span>UPSC</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-44-girl-or-boy/" rel="noopener"><span>Girl or Boy</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/amazon-inc/" target="_blank" rel="noopener"><span>Amazon</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-26-know-average-salary-without-disclosing-individual-salaries/" rel="noopener"><span>Know Average Salary without Disclosing Individual Salaries</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/infosys/" rel="noopener"><span>Infosys</span></a><span>, Bloomberg.</span></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-37-maximum-run-in-cricket/" rel="noopener"><span>Maximum run in cricket</span></a></td><td style="width: 233.333px;"><span>FAANG</span></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-32-completion-of-task/" rel="noopener"><span>Completion of Task</span></a></td><td style="width: 233.333px;"><span>Reflexis Systems</span></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-40-find-missing-row-in-excel/" rel="noopener"><span>Find missing Row in Excel</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/philips/" rel="noopener"><span>philips</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/four-people-rickety-bridge/" rel="noopener"><span>Four People on a Rickety Bridge</span></a></td><td style="width: 233.333px;"><span>Jumbotail, </span><a href="https://www.geeksforgeeks.org/companies/sap/" rel="noopener"><span>SAP</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-man-fell-in-well-puzzle/" rel="noopener"><span>Man fell in well Puzzle</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/american-express/" rel="noopener"><span>American Express</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-50-red-marbles-and-50-blue-marbles/" rel="noopener"><span>50 red marbles and 50 blue marbles</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/google/" rel="noopener"><span>Google</span></a><span>, </span><a href="https://www.geeksforgeeks.org/companies/microsoft/" rel="noopener"><span>Microsoft</span></a><span>, J</span><a href="https://www.geeksforgeeks.org/companies/jpmorgan-chase--co/" rel="noopener"><span>P morgan chase</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-form-three-equilateral-triangles/" rel="noopener"><span>Puzzle | Form Three Equilateral Triangles</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/google/" rel="noopener"><span>Google</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-10-identical-bottles-pills/" rel="noopener"><span>10 identical bottles of pills</span></a></td><td style="width: 233.333px;"><span>ZS Associate</span></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-maximum-pieces-that-can-be-cut-from-a-circle-using-6-straight-lines/" rel="noopener"><span>Puzzle | Maximum pieces that can be cut from a Circle using 6 straight lines</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/tata-consultancy-service-tcs/" rel="noopener"><span>TCS</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-85-chain-link-puzzle/" rel="noopener"><span>Chain Link Puzzle</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/cognizant/" rel="noopener"><span>cognizant</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/interview-puzzle-the-shopkeeper-and-the-lady-who-made-a-purchase-of-rs-200-with-fake-note/" rel="noopener"><span>The shopkeeper and the lady who made a purchase of Rs 200 with fake note</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/persistent-systems/" rel="noopener"><span>Persistent Systems</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/egg-dropping-puzzle-with-2-eggs-and-k-floors/" rel="noopener"><span>Egg Dropping Puzzle with 2 Eggs and K Floors</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/google/" rel="noopener"><span>Google</span></a><span>, </span><a href="https://www.geeksforgeeks.org/companies/microsoft/" rel="noopener"><span>Microsoft</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/minimum-number-of-apples-to-be-collected-from-trees-to-guarantee-m-red-apples/" rel="noopener"><span>Minimum number of Apples to be collected from trees to guarantee M red apples</span></a></td><td style="width: 233.333px;"><span>Leetcode</span></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-snail-and-wall/" rel="noopener"><span>Snail and Wall</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/tata-consultancy-service-tcs/" rel="noopener"><span>TCS</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-1000-light-bulbs-switched-on-off-by-1000-persons-passing-by/" rel="noopener"><span>1000 light bulbs switched on/off by 1000 people passing by</span></a></td><td style="width: 233.333px;"><span>UK university interview</span></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-four-alternating-knights/" rel="noopener"><span>Puzzle | Four Alternating Knights</span></a></td><td style="width: 233.333px;"><span>Amazon, </span><a href="https://www.geeksforgeeks.org/companies/google/" rel="noopener"><span>Google</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/tcs-digital-puzzle-lateral-thinking-2/" rel="noopener"><span>TCS DIGITAL PUZZLE | Lateral Thinking 2</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/tata-consultancy-service-tcs/" rel="noopener"><span>TCS</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-100-cows-and-milk/" rel="noopener"><span>Puzzle | 100 Cows And Milk</span></a></td><td style="width: 233.333px;"><span>ZS</span></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-one-mile-on-the-globe-mcq/" rel="noopener"><span>Puzzle | One Mile on the Globe</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/microsoft/" rel="noopener"><span>Microsoft</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/tcs-digital-puzzle-lateral-thinking/" rel="noopener"><span>TCS DIGITAL PUZZLE | Lateral Thinking</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/tata-consultancy-service-tcs/" rel="noopener"><span>TCS</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-the-counters-and-board/" rel="noopener"><span>Puzzle | The Counters and Board</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/jpmorgan-chase--co/" rel="noopener"><span>JP-morgan</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-15-camel-and-banana-puzzle/" rel="noopener"><span>Camel and Banana Puzzle</span></a></td><td style="width: 233.333px;"><span>Amazon, </span><a href="https://www.geeksforgeeks.org/companies/yahoo/" rel="noopener"><span>Yahoo</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-six-matches-right-foot-forward/" rel="noopener"><span>Puzzle | (Six Matches , Right Foot Forward)</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/tata-consultancy-service-tcs/" rel="noopener"><span>TCS</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-how-much-he-had-initially/" rel="noopener"><span>How much he had initially?</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/tag/ias/" rel="noopener"><span>IAS interview question</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-3-cuts-cut-round-cake-8-equal-pieces/" rel="noopener"><span>Puzzle | 3 cuts to cut round cake into 8 equal pieces</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/adobe-systems/" rel="noopener"><span>Adobe</span></a><span>, </span><a href="https://www.geeksforgeeks.org/companies/citiustech-healthcare-technology-private-ltd/" rel="noopener"><span>Citius Tech</span></a><span>, </span><a href="https://www.geeksforgeeks.org/companies/cognizant/" rel="noopener"><span>Cognizant</span></a><span>, </span><a href="https://www.geeksforgeeks.org/companies/blackrock/" rel="noopener"><span>blackrock</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-two-creepers-climbing-a-tree/" rel="noopener"><span>Two Creepers Climbing a Tree</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/adobe-systems/" rel="noopener"><span>Adobe</span></a><span>, </span><a href="https://www.geeksforgeeks.org/companies/google/" rel="noopener"><span>Google</span></a><span>, </span><a href="https://www.geeksforgeeks.org/companies/microsoft/" rel="noopener"><span>Microsoft</span></a></td></tr></tbody></table><p dir="ltr"><b><strong>Read More: </strong></b><a href="https://www.geeksforgeeks.org/tag/analytical-mathematical-puzzles/" rel="noopener"><span>Articles on Analytical/mathematical puzzles</span></a></p><h3 id="logical-puzzles"><b><strong>2. Logical Puzzles </strong></b></h3><table><thead><tr><th style="width: 233.333px;"><p style="text-align: center;" dir="ltr"><b><strong>Puzzle Title</strong></b></p></th><th style="width: 233.333px;"><p style="text-align: center;" dir="ltr"><b><strong>Asked in Company</strong></b></p></th></tr></thead><tbody><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-4-pay-an-employee-using-a-gold-rod-of-7-units/" rel="noopener"><span>Pay an employee using a gold rod of 7 units ?</span></a></td><td style="width: 233.333px;"><span>FAANG, Ola cabs</span></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-9-find-the-fastest-3-horses/" rel="noopener"><span>Find the fastest 3 horses</span></a></td><td style="width: 233.333px;"><span>Accolite, </span><a href="https://www.geeksforgeeks.org/companies/goldman-sachs/" rel="noopener"><span>Goldman Sachs</span></a><span>, </span><a href="https://www.geeksforgeeks.org/companies/makemytrip/" rel="noopener"><span>MakeMyTrip</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-5-finding-the-injection-for-anesthesia/" rel="noopener"><span>Finding the injection for Anesthesia</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/google/" rel="noopener"><span>Google</span></a><span>, </span><a href="https://www.geeksforgeeks.org/companies/yahoo/" rel="noopener"><span>Yahoo</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-7-3-bulbs-and-3-switches/" rel="noopener"><span>3 Bulbs and 3 Switches</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/makemytrip/" rel="noopener"><span>MakeMyTrip</span></a><span>, </span><a href="https://www.geeksforgeeks.org/companies/qualcomm/" rel="noopener"><span>Qualcomm</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-15-camel-and-banana-puzzle/" rel="noopener"><span>Camel and Banana Puzzle</span></a></td><td style="width: 233.333px;"><span>Amazon, </span><a href="https://www.geeksforgeeks.org/companies/yahoo/" rel="noopener"><span>Yahoo</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-7-find-the-jar-with-contaminated-pills/" rel="noopener"><span>Find the Jar with contaminated pills</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/makemytrip/" rel="noopener"><span>MakeMyTrip</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-13-100-prisoners-with-redblack-hats/" rel="noopener"><span>100 Prisoners with Red/Black Hats</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/google/" rel="noopener"><span>Google</span></a><span>, </span><a href="https://www.geeksforgeeks.org/companies/microsoft/" rel="noopener"><span>Microsoft</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-24-10-coins-puzzle/" rel="noopener"><span>10 Coins Puzzle</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/google/" rel="noopener"><span>Google</span></a><span>, </span><a href="https://www.geeksforgeeks.org/companies/yahoo/" rel="noopener"><span>Yahoo</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-14-strategy-for-a-2-player-coin-game/" rel="noopener"><span>Strategy for a 2-Player Coin Game</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/tata-consultancy-service-tcs/" rel="noopener"><span>TCS</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-20-5-pirates-and-100-gold-coins/" rel="noopener"><span>5 Pirates and 100 Gold Coins</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/microsoft/" rel="noopener"><span>Microsoft</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-31-minimum-cut-puzzle/" rel="noopener"><span>Minimum cut Puzzle</span></a></td><td style="width: 233.333px;"><span>Amazon</span></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-34-prisoner-and-policeman-puzzle/" rel="noopener"><span>Prisoner and Policeman Puzzle</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/microsoft/" rel="noopener"><span>Microsoft</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-cheating-husband/" rel="noopener"><span>Puzzle - Cheating Husband</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/microsoft/" rel="noopener"><span>Microsoft</span></a><span>, </span><a href="https://www.geeksforgeeks.org/companies/google/" rel="noopener"><span>Google</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-blind-games/" rel="noopener"><span>Puzzle – Blind Games</span></a></td><td style="width: 233.333px;"><span>Bloomberg L.P.</span></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-chameleons-go-on-a-date/" rel="noopener"><span>Puzzle – Chameleons go on a date</span></a></td><td style="width: 233.333px;"><span>Amazon</span></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-heaven-hell/" rel="noopener"><span>Heaven and Hell</span></a></td><td style="width: 233.333px;"><span>Amazon, </span><a href="https://www.geeksforgeeks.org/companies/infosys/" rel="noopener"><span>Infosys</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-mislabeled-jars/" rel="noopener"><span>Mislabeled Jars</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/google/" rel="noopener"><span>Google</span></a><span>, </span><a href="https://www.geeksforgeeks.org/companies/microsoft/" rel="noopener"><span>Microsoft</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-8-balls-problem/" rel="noopener"><span>8 balls problem</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/microsoft/" rel="noopener"><span>Microsoft</span></a><span>, Simence</span></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/cheryls-birthday-puzzle-and-solution/" rel="noopener"><span>Cheryl’s Birthday Puzzle and Solution</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/facebook/" rel="noopener"><span>Facebook</span></a><span>, Whatsapp, Singapore math Olympic</span></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-the-lion-and-the-unicorn/" rel="noopener"><span>Puzzle – The Lion and the Unicorn</span></a></td><td style="width: 233.333px;"><span>The Access Group (UK), </span><a href="https://www.geeksforgeeks.org/companies/tata-consultancy-service-tcs/" rel="noopener"><span>TCS</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-farmer-goat-wolf-cabbage/" rel="noopener"><span>Farmer, Goat, Wolf, and Cabbage</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/infosys/" rel="noopener"><span>Infosys</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-water-jug-problem/" rel="noopener"><span>Water Jug Problem</span></a></td><td style="width: 233.333px;"><span>Wells Fargo</span></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-blind-man-and-pills/" rel="noopener"><span>Blind man and Pills</span></a></td><td style="width: 233.333px;"><span>Mentor Graphics</span></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-the-burning-candles/" rel="noopener"><span>The Burning Candles</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/wipro/" rel="noopener"><span>Wipro</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-the-burning-candles/" rel="noopener"><span>Puzzle | The Burning Candles</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/wipro/" rel="noopener"><span>Wipro</span></a><span>, </span><a href="https://www.geeksforgeeks.org/companies/ibm/" rel="noopener"><span>IBM</span></a><span>, </span><a href="https://www.geeksforgeeks.org/companies/tata-consultancy-service-tcs/" rel="noopener"><span>TCS</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-rat-and-poisonous-milk-bottles/" rel="noopener"><span>Rat and Poisonous Milk Bottles</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/google/" rel="noopener"><span>Google</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/measuring-6l-water-4l-9l-buckets/" rel="noopener"><span>Measuring 6L water from 4L and 9L buckets</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/microsoft/" rel="noopener"><span>Microsoft</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-six-houses-p-q-r-s-t-and-u/" rel="noopener"><span>Six Houses P, Q, R, S, T, and U</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/category/quizzes-gq/cat-quiz/" rel="noopener"><span>CAT Quiz</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/melting-candles-puzzle/" rel="noopener"><span>Melting Candles</span></a></td><td style="width: 233.333px;"><span>Faang</span></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-47-red-hat-vs-blue-hat/" rel="noopener"><span>Red Hat vs Blue Hat</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/microsoft/" rel="noopener"><span>Microsoft</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-joint-family-of-seven-persons-l-m-n-o-p-q-and-r/" rel="noopener"><span>Puzzle | Joint family of seven persons (L, M, N, O, P, Q, and R)</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/tata-consultancy-service-tcs/" rel="noopener"><span>TCS</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-the-circle-of-lights/" rel="noopener"><span>Puzzle | The Circle of Lights</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/microsoft/" rel="noopener"><span>Microsoft</span></a><span>, Bloomberg</span></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-9-students-and-red-black-hats/" rel="noopener"><span>Puzzle | 9 Students and Red Black Hats</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/google/" rel="noopener"><span>Google</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-light-all-the-bulbs/" rel="noopener"><span>Light all the bulbs</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/microsoft/" rel="noopener"><span>Microsoft</span></a><span>, Bloomberg</span></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-distribute-the-water/" rel="noopener"><span>Distribute the Water</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/microsoft/" rel="noopener"><span>Microsoft</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-can-2-persons-be-with-same-number-of-hairs-on-their-heads/" rel="noopener"><span>Puzzle | Can 2 persons be with same number of hairs on their heads?</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/oppo/" rel="noopener"><span>oppo</span></a><span>, inflame</span></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/weight-heavy-ball/" rel="noopener"><span>Weight of Heavy Ball</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/ibm/" rel="noopener"><span>IBM</span></a></td></tr></tbody></table><p dir="ltr"><b><strong>Read More:</strong></b><a href="https://www.geeksforgeeks.org/tag/logical-puzzles/" rel="noopener"><span>Articles on Logical Puzzles</span></a></p><h3 id="arrangement-puzzles"><b><strong>3. Arrangement Puzzles</strong></b></h3><table><thead><tr><th style="width: 233.333px;"><p style="text-align: center;" dir="ltr"><b><strong>Puzzle Title</strong></b></p></th><th style="width: 233.333px;"><p style="text-align: center;" dir="ltr"><b><strong>Asked in Company</strong></b></p></th></tr></thead><tbody><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-24-10-coins-puzzle/" rel="noopener"><span>10 Coins Puzzle</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/google/" rel="noopener"><span>Google</span></a><span>, </span><a href="https://www.geeksforgeeks.org/companies/yahoo/" rel="noopener"><span>Yahoo</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-23-days-of-month-using-2-dice/" rel="noopener"><span>Days of the month using 2 dice</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/microsoft/" rel="noopener"><span>Microsoft</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-38-tic-tac-toe-puzzle/" rel="noopener"><span>Tic Tac Toe Puzzle</span></a></td><td style="width: 233.333px;"><span>Amazon</span></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-36-matchstick-puzzle/" rel="noopener"><span>Matchstick Puzzle</span></a></td><td style="width: 233.333px;"><span>Kirloskar Brothers, SLB</span></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-30-last-palindrome-data/" rel="noopener"><span>Last Palindrome Date Before 10/02/2001</span></a></td><td style="width: 233.333px;"><span>Amazon</span></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-10-identical-bottles-pills/" rel="noopener"><span>10 identical bottles of pills</span></a></td><td style="width: 233.333px;"><span>ZS Associate</span></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-10-balls-in-5-lines/" rel="noopener"><span>10 Balls in 5 Lines</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/publicis-sapient/" rel="noopener"><span>Publicis Sapient</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-round-table-coin-game/" rel="noopener"><span>Round table coin game</span></a></td><td style="width: 233.333px;"><span>ElectrifAi</span></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-the-circle-of-lights/" rel="noopener"><span>Puzzle | The Circle of Lights</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/microsoft/" rel="noopener"><span>Microsoft</span></a><span>, Bloomberg</span></td></tr></tbody></table><p dir="ltr"><b><strong>Read More: </strong></b><a href="https://www.geeksforgeeks.org/tag/arrangement-puzzles/" rel="noopener"><span>Articles on Arrangement Puzzles</span></a></p><h3 id="shape-based-puzzles"><b><strong>3. Shape based Puzzles</strong></b></h3><table><thead><tr><th style="width: 233.333px;"><p style="text-align: center;" dir="ltr"><span>Puzzle Title</span></p></th><th style="width: 233.333px;"><p style="text-align: center;" dir="ltr"><span>Asked in Company</span></p></th></tr></thead><tbody><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-3-cuts-cut-round-cake-8-equal-pieces/" rel="noopener"><span>3 cuts to cut the round cake into 8 equal pieces</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/adobe-systems/" rel="noopener"><span>Adobe</span></a><span>, </span><a href="https://www.geeksforgeeks.org/companies/citiustech-healthcare-technology-private-ltd/" rel="noopener"><span>Citius Tech</span></a><span>, </span><a href="https://www.geeksforgeeks.org/companies/cognizant-technology-solutions/" rel="noopener"><span>Cognizant</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-25chessboard-and-dominos/" rel="noopener"><span>Chessboard and dominos</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/google/" rel="noopener"><span>Google</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-36-matchstick-puzzle/" rel="noopener"><span>Puzzle 36 | (Matchstick Puzzle)</span></a></td><td style="width: 233.333px;"><span>SLB</span></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-maximum-pieces-that-can-be-cut-from-a-circle-using-6-straight-lines/" rel="noopener"><span>Maximum pieces that can be cut from a Circle using 6 straight lines</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/tata-consultancy-service-tcs/" rel="noopener"><span>TCS</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-splitting-a-cake-with-a-missing-piece-in-two-equal-portion/" rel="noopener"><span>Splitting a Cake with a Missing Piece in two equal portion</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/sap/" rel="noopener"><span>SAP</span></a></td></tr><tr><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/puzzle-21-3-ants-and-triangle/" rel="noopener"><span>3 Ants and Triangle</span></a></td><td style="width: 233.333px;"><a href="https://www.geeksforgeeks.org/companies/intuit/" rel="noopener"><span>Intuit</span></a><span>, ZS Associate, </span><a href="https://www.geeksforgeeks.org/companies/exl/" rel="noopener"><span>EXL</span></a></td></tr></tbody></table><p dir="ltr"><b><strong>Read More:</strong></b><span> </span><a href="https://www.geeksforgeeks.org/tag/shape-puzzles/" rel="noopener"><span>Articles on Shape based puzzles</span></a></p><h3 id="mechanical-puzzles"><b><strong>4. Mechanical Puzzles</strong></b></h3><ol><li value="1"><a href="https://www.geeksforgeeks.org/algorithm-to-solve-rubiks-cube/" rel="noopener"><span>Algorithm to solve Rubik’s Cube</span></a></li><li value="2"><a href="https://www.geeksforgeeks.org/crossword-puzzle-of-the-week-1-for-dsa/" rel="noopener"><span>Crossword Puzzle Of The Week #1 (for DSA)</span></a></li><li value="3"><a href="https://www.geeksforgeeks.org/crossword-puzzle-of-the-week-2-for-computer-science-and-applications/" rel="noopener"><span>Crossword Puzzle Of The Week #2 (for Computer Science and Applications)</span></a></li><li value="4"><a href="https://www.geeksforgeeks.org/crossword-puzzle-of-the-week-3-for-database-and-queries/" rel="noopener"><span>Crossword Puzzle Of The Week #3 (for Database and Queries)</span></a></li><li value="5"><a href="https://www.geeksforgeeks.org/crossword-puzzle-of-the-week-4-for-object-oriented-programming/" rel="noopener"><span>Crossword Puzzle Of The Week #4 (for Object Oriented Programming)</span></a></li></ol><h3 id="quick-links"><b><strong>Quick Links:</strong></b></h3><ul><li value="1"><a href="https://www.geeksforgeeks.org/logic-building-problems/" target="_blank" rel="noopener"><span>Logic Building Coding Problems</span></a></li><li value="2"><a href="https://practice.geeksforgeeks.org/topics/Puzzle/" rel="noopener"><span>'Practice Problems' on Puzzles</span></a></li><li value="3"><a href="https://www.geeksforgeeks.org/category/puzzles/" rel="noopener"><span>Recent Puzzles!</span></a></li></ul> <!-- Quiz Carousel --> <div class='article_bottom_text'></div><br> <div id="video-tab-content" class="video-tab-content"> <div style="text-align: center; margin: 20px 0px;" id="GFG_AD_InContent_Desktop_728x280"></div> </div> <div class="d-row content-bw "style="margin-top: 20px;"> <div class="article-pgnavi_prev"><div class="comment_div" data-title="Comments"><button class="author_footer_btn" data-gfg-action="loadComments"> <div class='discussion_panel'> <i class='discussion_button'> </i> Comment </div></button></div><div class="trigger-div"><button class="author_footer_btn"><div class="more_info">More info<span class="more_info_uparrow gfg-icon gfg-icon_arrow-down-thin"></span></div></button></div> <a href="https://www.geeksforgeeks.org/about/contact-us/?listicles" target="_blank" class="advertise-with-us-div"><button class="advertise-with-us-btn"><span class="advertise-with-us-text">Advertise with us</span></button></a> </div> <div class="article-pgnavi_next"> <a href="https://www.geeksforgeeks.org/puzzle-1-how-to-measure-45-minutes-using-two-identical-wires/?ref=next_article" class="pg-head"> <span>Next Article</span> <span class="gfg-icon gfg-icon_next"></span> </a> <!-- <div class="pg-meta">8 Min Read | <a href="#">Java</a></div> --> <div class="pg-main"> <a href="https://www.geeksforgeeks.org/puzzle-1-how-to-measure-45-minutes-using-two-identical-wires/?ref=next_article">Puzzle 1 | (How to Measure 45 minutes using two identical wires?)</a> </div> </div> </div> <div class="more-info hidden-div"> <div class="article-meta-author-details "> <div class="article-meta-author-details-block"> <div class="article-meta-author-details-profile-display"> <div class="author_info"> <div class="article-meta-author-details-profile-display-icon"> <a href="https://www.geeksforgeeks.org/user/kartik/contributions/?itm_source=geeksforgeeks&itm_medium=article_author&itm_campaign=auth_user" style="text-decoration: none;"><div class="image-wrap" style="position: relative"><img src="https://media.geeksforgeeks.org/auth/profile/sb7ciorr5k5t22woqkes" class="avatarprofile_image restrict-popup-gfg" alt="author"> <div style="position: absolute;top: -35px; left: -13px;"> <i class="gfg-badge-icon md master"></i> </div> </div> </a> </div> <div class="article-meta-author-details-profile-display-name" > <a aria-label="author profile" href="https://www.geeksforgeeks.org/user/kartik/contributions/?itm_source=geeksforgeeks&itm_medium=article_author&itm_campaign=auth_user" style="display: block;overflow: hidden;width: 65px;text-decoration: none;text-overflow: ellipsis;color: var(--gfg-title-color);font-weight: bold;white-space: nowrap;">kartik</a> </div> </div> <div class="author_follow_btn"><div class="article-meta-author-details-follow-button"> <div class="follow-container"> <div class="follow-btn" > <button id="followAuthor" type="button" onclick ="followOrUnfollowAuthor()" value="kartik"> <span role="img" aria-label="plus" class="plus-icon"><svg viewBox="64 64 896 896" focusable="false" data-icon="plus" width="1em" height="1em" fill="currentColor" aria-hidden="true"><defs><style></style></defs><path d="M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"></path><path d="M176 474h672q8 0 8 8v60q0 8-8 8H176q-8 0-8-8v-60q0-8 8-8z"></path></svg></span> <span>Follow</span></button></div></div></div></div> </div> </div> <div class="article_bottom_suggestion_wrapper"> <div class="article_bottom_suggestion" data-title="Follow"> <a href='https://news.google.com/publications/CAAqBwgKMLTrzwsw44bnAw?hl=en-IN&gl=IN&ceid=IN%3Aen' target="_blank"> <img class="gfg-icon_Gnews no-zoom-in-cursor" src=https://media.geeksforgeeks.org/auth-dashboard-uploads/Google-news.svg loading="lazy" alt="News"></img> </a> </div> <div pid="1096380" class="article--viewer_like tooltip tooltipBottom" data-title="Like Article"> <!-- <span class="tooltiptext likeTooltipBottom">Like Article</span> --> <button id="likeButton" aria-label="like article" data-gfg-action="like-article" data-bookmark-value="0" data-liked="false" style="color: #5B5A5A !important; display: flex; align-items: center; background-color: unset; margin: 0px !important; padding: 5px 0px;"> <i class="author-badge-like-button"></i> <figure id="likeCount" style="margin-left: 3px; margin-top: 4px; color: var(--like-count-color); font-size: 14px; font-weight: 600;" class="favoriteText"></figure> </button> </div> <div class="article_bottom_suggestion" onclick="improveArticleCall()" data-title="Improve"> <span class="improveTooltipBottom">Improve</span> <i class="author-badge-improvement-button"></i> </div> </div> </div> <div class="bottom-wrap" style="margin-top: 12px; margin-bottom: 25px;"> <div class="improved"> <div class="t-head">Article Tags : </div> <ul> <li style="border-radius: 25px;" class=""> <a href="https://www.geeksforgeeks.org/category/puzzles/?ref=article_category">Puzzles</a> </li> <li style="border-radius: 25px;" class=""> <a href="https://www.geeksforgeeks.org/tag/tutorials/?ref=article_tag">Tutorials</a> </li> </ul> </div> <div class="improved"> <div class="t-head">Practice Tags : </div> <ul class="practice-tags"> <li><a href="https://www.geeksforgeeks.org/explore?category=Puzzles&ref=article_practice_tag">Puzzles</a></li> </ul> </div> </div> </div> </article> <div class="article--recommended article--recommended_wrapper" id="similar-reads"> <h3 class="new-top-bar top-bar-title">Similar Reads</h3> <div class="gfg-similar-reads-list"> <ul class="similarReadLeftBarList"><div class="second"><li class="currentpage similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzles/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzles </div> <div class="gfg-similar-read-item-subheading">Puzzles are commonly asked in exams and interviews to test logical and analytical thinking. Here is a list of most asked Puzzles divided into four categories as per examination pattern. 1. Analytical / Mathematical PuzzlesPuzzle Title Asked in Company Find ages of daughtersGoogle, MicrosoftCalculate</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">4 min read</span> </div> </a></li><div class="leftbar-dropdown"><h2 class="dropdown-title">Mathematical/Analytical Puzzle<span class="gfg-icon gfg-icon_arrow-down-thin"></span></h2><ul style="display: none;"><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-1-how-to-measure-45-minutes-using-two-identical-wires/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle 1 | (How to Measure 45 minutes using two identical wires?) </div> <div class="gfg-similar-read-item-subheading">How do we measure forty-five minutes using two identical wires, each of which takes an hour to burn? We have matchsticks with us. The wires burn non-uniformly. So, for example, the two halves of wire might burn in 10 minutes and 50 minutes respectively. Answer: If we light a wire, it takes 60 minute</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">1 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-2-find-ages-of-daughters/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle - Find the ages of daughters </div> <div class="gfg-similar-read-item-subheading">Alok has three daughters. His friend Shyam wants to know the ages of his daughters. Alok gives him a first hint. 1. The product of their age is 72. Shyam says this is not enough information Alok gives him a second hint. 2. The sum of their ages is equal to my house number. Shyam goes out and looks a</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">3 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-3-calculate-total-distance-travelled-by-bee/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle - Calculate total distance travelled by bee </div> <div class="gfg-similar-read-item-subheading">Puzzle: Two trains are on same track and they are coming toward each other. The speed of the first train is 50 km/h and the speed of the second train is 70 km/h. A bee starts flying between the trains when the distance between two trains is 100 km. The bee first flies from first train to second trai</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">2 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-6-monty-hall-problem/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Monty Hall problem </div> <div class="gfg-similar-read-item-subheading">The Monty Hall problem is a surprising probability puzzle: There are 3 doors—two hide goats, and one hides a car.You pick one door (let’s call it door 2), hoping it has the car.The game show host, Monty Hall, then looks at the other two doors (1 and 3) and opens one that has a goat behind it (Say 3)</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">2 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-16-100-doors/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle 16 | (100 Doors) </div> <div class="gfg-similar-read-item-subheading">There are 100 doors in a row, all doors are initially closed. A person walks through all doors multiple times and toggle (if open then close, if close then open) them in the following way: In the first walk, the person toggles every door In the second walk, the person toggles every second door, i.e.</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">2 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-18-torch-and-bridge/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle - Torch and Bridge </div> <div class="gfg-similar-read-item-subheading">There are 4 persons (A, B, C, and D) who want to cross a bridge at night. A takes 1 minute to cross the bridge.B takes 2 minutes to cross the bridge.C takes 5 minutes to cross the bridge.D takes 8 minutes to cross the bridge.There is only one torch with them and the bridge cannot be crossed without</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">2 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-set-35-2-eggs-and-100-floors/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle - 2 Eggs and 100 Floors </div> <div class="gfg-similar-read-item-subheading">The following is a description of the instance of this famous puzzle involving 2 eggs and a building with 100 floors. Suppose that we wish to know which stories in a 100-storey building are safe to drop eggs from, and which will cause the eggs to break on landing. What strategy should be used to dro</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">3 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-12-maximize-probability-of-white-ball/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle 12 | (Maximize probability of White Ball) </div> <div class="gfg-similar-read-item-subheading">There are two empty bowls in a room. You have 50 white balls and 50 black balls. After you place the balls in the bowls, a random ball will be picked from a random bowl. Distribute the balls (all of them) into the bowls to maximize the chance of picking a white ball. Explanation: First, let us assum</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">1 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-27-hourglasses-puzzle/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle 27 | (Hourglasses Puzzle) </div> <div class="gfg-similar-read-item-subheading">Puzzle: Given two hourglass of 4 minutes and 7 minutes, the task is to measure 9 minutes. Solution: At 0 minutes: Start both hourglasses at the same time. At 4 minutes: 4 minutes hourglass runs out and flip it. 7 minutes hourglass is left with 3 minutes. At 7 minutes: 4 minutes hourglass is left wit</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">1 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-17-ratio-of-boys-and-girls-in-a-country-where-people-want-only-boys/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle 17 | (Ratio of Boys and Girls in a Country where people want only boys) </div> <div class="gfg-similar-read-item-subheading">In a country, all families want a boy. They keep having babies till a boy is born. What is the expected ratio of boys and girls in the country? Solution: Assumptions: Probability of having a boy or girl is same. Also, the probability of next kid being a boy doesn't depend on history. The problem can</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">2 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-29-car-wheel-puzzle/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle 29 | (Car Wheel Puzzle) </div> <div class="gfg-similar-read-item-subheading">Puzzle: A car has 4 tyres and 1 spare tyre. Each tyre can travel a maximum distance of 20000 km before wearing off. What is the maximum distance the car can travel before you are forced to buy a new tyre? You are allowed to change tyres (using the spare tyre) an unlimited number of times.  Answer:</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">6 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-22-maximum-chocolates/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle 22 | (Maximum Chocolates) </div> <div class="gfg-similar-read-item-subheading">You have 15 Rs with you. You go to a shop and shopkeeper tells you price as 1 Rs per chocolate. He also tells you that you can get a chocolate in return of 3 wrappers. How many maximum chocolates you can eat? Answer: 22 Buy and eat 15 chocolates Return 15 wrappers and get 5 more chocolates. Return 3</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">1 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-28-newspaper-puzzle/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle 28 | (Newspaper Puzzle) </div> <div class="gfg-similar-read-item-subheading">Question: A newspaper made of 16 large sheets of paper folded in half. The newspaper has 64 pages altogether. The first sheet contains pages 1, 2, 63, 64. If we pick up a sheet containing page number 45. What are the other pages that this sheet contains? Answer: On the back of 45, it is 46. The page</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">1 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-33-rs-500-note-puzzle/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle 33 | ( Rs 500 Note Puzzle ) </div> <div class="gfg-similar-read-item-subheading">A Lady (L) bought an item of Rs 100 from the Shopkeeper (C). She paid him through a 500 Rs Note. Realizing that he did not have change, the shopkeeper C got change for that note from another shopkeeper (S) and paid Rs 400 to the Lady. After a few days, S realized that the note is fake, And this rail</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">1 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-39-hundred-coin-puzzle/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle 39 | (100 coins puzzle) </div> <div class="gfg-similar-read-item-subheading">This puzzle is similar to 10 Coins Puzzle. Question: 100 coins are lying flat on a table. 10 of them are heads up and 90 are tails up.You can't see which one is which.How can we split the coins into two piles such that there are same number of heads up in each pile? Note: It is allowed to flip the c</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">1 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-44-girl-or-boy/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle 44 | Girl or Boy </div> <div class="gfg-similar-read-item-subheading">The Boy or Girl problem is a set of probability questions that have sparked much discussion among mathematicians. However, here’s a puzzle for you that has a clear and unambiguous answer. Suppose that I have a friend whose name is Ankur. Ankur has his elder brother who got married 10 years before. B</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">4 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-26-know-average-salary-without-disclosing-individual-salaries/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle 26 | (Know Average Salary without Disclosing Individual Salaries) </div> <div class="gfg-similar-read-item-subheading">Three Employees want to know the average of their salaries. They are not allowed to share their individual salaries. Answer: Follow these steps Step 1) X adds a Random Number and his salary and tells the sum to Y. Step 2) Y also adds a Random Number and his salary to the sum told by X and tells new</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">1 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-37-maximum-run-in-cricket/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle 37 | (Maximum run in cricket) </div> <div class="gfg-similar-read-item-subheading">Question: In a one day international cricket match, considering no extras(no wides, no 'no' balls, etc.) and no overthrows. What is the maximum number of runs that a batsman can score in an ideal case ? Note:"Here we assume ideal and little practical scenario. We assume that batsman can not run for</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">1 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-32-completion-of-task/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle 32| (Completion of Task) </div> <div class="gfg-similar-read-item-subheading">A man is allocated a task. He doubles the task done everyday. If the man completely does the task in 18 days, how many days did it take for the man to complete 25% of the task? Answer: 16 [Tex]w [/Tex] 100% of task = 18 days As he doubles the task everyday. So, 50% of task = 17 days 25% of task = 16</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">2 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-40-find-missing-row-in-excel/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle 40 | (Find missing Row in Excel) </div> <div class="gfg-similar-read-item-subheading">We are given an excel sheet which contains integers from 1 to 50, including both. However, the numbers are in a jumbled form and there is 1 integer missing. You have to write a code to identify the missing integer. Only the logic is required. Solution: We know that the sum of all the numbers from 1</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">1 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/four-people-rickety-bridge/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Four People on a Rickety Bridge </div> <div class="gfg-similar-read-item-subheading">Question: Four people need to cross a rickety bridge at night. Unfortunately, they have one torch and the bridge is too dangerous to cross without a torch. The bridge can support only two people at a time. All the people don't take the same time to cross the bridge. Time for each person: 1 min, 2 mi</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">2 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-man-fell-in-well-puzzle/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle | Man fell in well Puzzle </div> <div class="gfg-similar-read-item-subheading">A man fell in a 50m deep well. He climbs 4 meters up and slips 3 meters down in one day. How many days would it take for him to come out of the well? Answer: 47days Explanation: On the first day, the man climbs 4 meters up and slips 3 meters down, therefore he only climbs 1 meter up totally.On the s</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">1 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-50-red-marbles-and-50-blue-marbles/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle | 50 red marbles and 50 blue marbles </div> <div class="gfg-similar-read-item-subheading">Give two boxes B1 and B2 one have 50 red marbles and other have 50 blue marbles. A ball is selected randomly from any of the box and the task is to maximize the probability of selecting a red ball, by reshuffling marbles in both the boxes. Solution: Let P(R) be the probability of picking a red marbl</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">2 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-bag-of-coins/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle | Bag of Coins </div> <div class="gfg-similar-read-item-subheading">Puzzle: Ishita has 10 bags full of coins. Each bag contains 1000 coins. But one bag is full of forgeries, and she just can't recall which one. She does know that genuine coins weigh 1 gram, but forgeries weigh 1.1 grams. To hide the fact that she can't recall which bag contains forgeries, she needs</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">2 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-find-last-ball-remain-entire-process/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle | Find the last ball to remain after the entire process </div> <div class="gfg-similar-read-item-subheading">Problem Statement: You have 20 Red and 16 Blue balls in a bag. You pull out 2 balls one after another. If the balls are of the same color, then you replace them with a Blue ball – but if they are of different color, you replace them with a Red ball. Once you take out the balls, you do not put them b</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">3 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-10-identical-bottles-pills/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle | 10 identical bottles of pills </div> <div class="gfg-similar-read-item-subheading">Puzzle: Given 10 identical bottles of identical pills (each bottle contains 100 pills). Out of 10 bottles 9 have 1 gram of pills but 1 bottle has pills of the weight of 1.1 gram. Given a measurement scale, how would you find the heavy bottle? You can use the scale only once. Solution: Step 1: Arra</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">2 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/hungry-worm-and-old-tree-riddle-puzzle/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Hungry Worm and Old Tree Riddle | Puzzle </div> <div class="gfg-similar-read-item-subheading">Problem Statement: A very hungry worm reaches a tree and eats the leaves in the following sequence: DAY 1: The worm eats 1 leafDAY 2: TWICE( DAY 1)= 2 leavesDAY 3: TWICE( DAY 2)= 4 leavesDAY 4: TWICE( DAY 3)= 8 leaves and so on.....(up to 30 days) The above eating sequence continues for 30 days and</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">2 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-85-chain-link-puzzle/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle 85 | Chain Link Puzzle </div> <div class="gfg-similar-read-item-subheading">You have five pieces of chain, each consisting of three links. You want to make one long chain of these five pieces. Breaking open a link costs 1 Rs, and welding an open link costs 3 Rs. Is it possible to make one long chain of the five pieces, if you have just 15 Rs? Solution: Let us name the chain</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">1 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/interview-puzzle-the-shopkeeper-and-the-lady-who-made-a-purchase-of-rs-200-with-fake-note/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Interview Puzzle | The shopkeeper and the lady who made a purchase of Rs 200 with fake note </div> <div class="gfg-similar-read-item-subheading">Puzzle: A lady makes a purchase of Rs 200/- in a store. The shopkeeper sells the goods with zero profit. He receives a Rs 1000/- note from the lady. The shopkeeper gets the change from the next shop, retains Rs.200 for himself, and gives the lady Rs.800 back. Later, the shopkeeper at the next shop c</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">1 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-snail-and-wall/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle | Snail and Wall </div> <div class="gfg-similar-read-item-subheading">Puzzle: A snail wishes to reach a water shore. To do this it must cross a wall which is 30 feet high. It has a time limit of 30 hours to reach atop the wall. The time starts as soon as it starts climbing the wall. However, he faces a problem while climbing. Every hour it climbs the wall 3 feet up, i</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">1 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-45-gem-in-pockets/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle 45 | Gem in Pockets </div> <div class="gfg-similar-read-item-subheading">Vijay Dinanath Chauhan aka “VDC” was travelling from Bangalore to New Delhi along with his friends. VDC was wearing a Cargo Jeans with finite number of small pockets. And in his pockets, there were packets of gems, not the real ones,actually the Cadbury gems to eat when he reaches Delhi.In each pock</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">2 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/pizza-puzzle/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Pizza Puzzle </div> <div class="gfg-similar-read-item-subheading">Problem Statement: At a restaurant, pizzas can be ordered in boxes of 6, 9, and 20. What is the highest number of Pizzas that cannot be bought with any combination of these boxes? For Example: There exist two types of solutions for such a problem.They include mathematical and algorithmic ones.The ma</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">3 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-49-king-and-his-elephant-power/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle 49 | King and his Elephants </div> <div class="gfg-similar-read-item-subheading">A king dies after writing an agreement to divide the elephant power to his three sons, the first son has to get 1/2 of elephants, second son gets 3/4th of remaining elephants left after giving away to the first son, third son gets 1/2th of remaining elephants left after giving away to the second son</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">1 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-find-the-box-which-contains-box-of-11-gm-cigarettes/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle | Find the box which contains Box of 11 gm Cigarettes </div> <div class="gfg-similar-read-item-subheading">Suppose you have 10 boxes and each box contains 10 Cigarettes. 9 out of 10 boxes have each Cigarette of 10 gm. Remaining 1 box has each Cigarette of 11 gm. The task is to find the box which contains 11gm Cigarettes. Constraint: You have an electronic weighing machine and with the help of that you ha</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">2 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-how-much-he-had-initially/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle | How much he had initially? </div> <div class="gfg-similar-read-item-subheading">Puzzle: Rama started on a quest of visiting temples, with few coins in his pockets. As soon as he visits any temple, the money in his pocket gets doubled and on his way out, he donates Rs. 100 to each temple. He visits 4 temples on his quest. After visiting the last temple, his pocket is empty of al</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">2 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-minimum-planes-to-go-around-the-world/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle | Minimum planes to go around the world </div> <div class="gfg-similar-read-item-subheading">On an Island, there is an airport that has an unlimited number of identical air-planes. Each air-plane has a fuel capacity to allow it to fly exactly 1/2 way around the world, along a great circle. The planes have the ability to refuel in flight without loss of speed or spillage of fuel. Though the</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">2 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-six-colored-cube/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle | Six colored cube </div> <div class="gfg-similar-read-item-subheading">Given six distinct colors, in how many unique ways can a six faced cube be painted such that no two faces have the same color? Note: Mixing of colors is not allowed. Answer: 30 ways Explanation: To avoid repetitions, let us fix the color of the top face. Hence, the bottom face can be painted in 5 wa</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">1 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li></ul></div><div class="leftbar-dropdown"><h2 class="dropdown-title">Logical Puzzles<span class="gfg-icon gfg-icon_arrow-down-thin"></span></h2><ul style="display: none;"><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-9-find-the-fastest-3-horses/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle 9 | (Find the fastest 3 horses) </div> <div class="gfg-similar-read-item-subheading">There are 25 horses among which you need to find out the fastest 3 horses. You can conduct a race among at most 5 to find out their relative speed. At no point, you can find out the actual speed of the horse in a race. Find out the minimum no. of races which are required to get the top 3 horses. Sol</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">4 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-5-finding-the-injection-for-anesthesia/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle 5 | (Finding the Injection for Anesthesia) </div> <div class="gfg-similar-read-item-subheading">In a Medical Laboratory, you have 240 Injections, one of which is for Anesthesia for a rat. If Anesthesia injection is injected in a rat, it will faint in within 24 hours. You have 5 rats available to determine which one injection contains the Anesthesia. How do you achieve this in 48 hours ? Clarif</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">3 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-4-pay-an-employee-using-a-gold-rod-of-7-units/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle 4 | (Pay an employee using a gold rod of 7 units ?) </div> <div class="gfg-similar-read-item-subheading">An employee works for an employer for 7 days. The employer has a gold rod of 7 units. How does the employer pay to the employee, so that the number of employee’s rod units increases by one at the end of each day? The employer can make at most 2 cuts in the rod. (Hint- after the end of the day employ</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">1 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-7-3-bulbs-and-3-switches/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle 7 | (3 Bulbs and 3 Switches) </div> <div class="gfg-similar-read-item-subheading">There is a room with a door (closed) and three light bulbs inside the room. Outside the room, there are three switches, connected to the bulbs. You may manipulate the switches as you wish, but once you open the door you can’t change them. All bulbs are in working condition and you can open the door</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">1 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-15-camel-and-banana-puzzle/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle 15 | (Camel and Banana Puzzle) </div> <div class="gfg-similar-read-item-subheading">A person has 3000 bananas and a camel. The person wants to transport the maximum number of bananas to a destination which is 1000 KMs away, using only the camel as a mode of transportation. The camel cannot carry more than 1000 bananas at a time and eats a banana every km it travels. What is the max</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">4 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-7-find-the-jar-with-contaminated-pills/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle 8 | (Find the Jar with contaminated pills) </div> <div class="gfg-similar-read-item-subheading">Puzzle: You have 5 jars of pills. Each pill weighs 10 grams, except for contaminated pills contained in one jar, where each pill weighs 9 grams. Given a scale, how could you tell which jar had the contaminated pills in just one measurement? Solution: To find the contaminated Jar, follow this step-wi</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">1 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-10-a-man-with-medical-condition-and-2-pills/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle 10 | (A Man with Medical Condition and 2 Pills) </div> <div class="gfg-similar-read-item-subheading">Puzzle: A man has a medical condition that requires him to take two kinds of pills, call them A and B. The man must take exactly one A pill and exactly one B pill each day, or he will die. The pills are taken by first dissolving them in water. The man has a jar of A pills and a jar of B pills. One d</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">2 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-13-100-prisoners-with-redblack-hats/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle 13 | (100 Prisoners with Red/Black Hats) </div> <div class="gfg-similar-read-item-subheading">100 prisoners in jail are standing in a queue facing in one direction. Each prisoner is wearing a hat of color either black or red. A prisoner can see hats of all prisoners in front of him in the queue, but cannot see his hat and hats of prisoners standing behind him. The jailer is going to ask colo</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">3 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-24-10-coins-puzzle/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle 24 | (10 Coins Puzzle) </div> <div class="gfg-similar-read-item-subheading">You are blindfolded and 10 coins are placed in front of you on the table. You are allowed to touch the coins but can’t tell which way up they are by feel. You are told that there are 5 coins head up, and 5 coins tails up but not which ones are which. Can you make two piles of coins each with the sam</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">1 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-14-strategy-for-a-2-player-coin-game/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle 14 | (Strategy for a 2 Player Coin Game) </div> <div class="gfg-similar-read-item-subheading">Puzzle: Consider a two-player coin game where each Player A and Player B gets the turn one by one. There is a row of even number of coins, and a player on his/her turn can pick a coin from any of the two corners of the row.  The player that collects coins with more value wins the game. Develop a str</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">5 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-19-poison-and-rat/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle 19 | (Poison and Rat) </div> <div class="gfg-similar-read-item-subheading">There are 1000 wine bottles. One of the bottles contains poisoned wine. A rat dies after one hour of drinking the poisoned wine. How many minimum rats are needed to figure out which bottle contains poison in hour. Solution:We need to figure out in hour. We need 10 rats to figure out the poisoned bot</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">1 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-20-5-pirates-and-100-gold-coins/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle 20 | (5 Pirates and 100 Gold Coins) </div> <div class="gfg-similar-read-item-subheading">There are 5 pirates, they must decide how to distribute 100 gold coins among them. The pirates have seniority levels, the senior-most is A, then B, then C, then D, and finally the junior-most is E. Rules of distribution are: The most senior pirate proposes a distribution of coins.All pirates vote on</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">2 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-31-minimum-cut-puzzle/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle 31 | (Minimum cut Puzzle) </div> <div class="gfg-similar-read-item-subheading">Puzzle: You have got someone working for you for five days and a gold bar to pay him. You must give them a piece of gold at the end of every day. What are the fewest number of cuts to the bar of gold that will allow you to pay him 1/5th each day? Answer: 2 cuts. Solution: Explanation 1: After two cu</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">2 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-34-prisoner-and-policeman-puzzle/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle 34 | (Prisoner and Policeman Puzzle) </div> <div class="gfg-similar-read-item-subheading">Policeman decided to punish the Prisoner and asked him to make a statement. The Prisoner should make such a statement so that he would be alive. If the statement is held true by Policeman, the Prisoner will be hanged to death and if the statement is held false, the Prisoner will be shot dead. Answer</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">1 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-36-matchstick-puzzle/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle 36 | (Matchstick Puzzle) </div> <div class="gfg-similar-read-item-subheading">Question: How to make 4 equilateral triangles with 6 identical match sticks? Method - I: Make a tetrahedron. Method-II: Method - III: Make one equilateral triangle by three sticks . then put each remaining stick on straight line passing through middle points of each two arms of triangle. Method IV:</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">1 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/missionaries-and-cannibals/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Missionaries and Cannibals </div> <div class="gfg-similar-read-item-subheading">Question: In the missionaries and cannibals problem, three missionaries and three cannibals must cross a river using a boat which can carry at most two people, under the constraint that, for both banks, if there are missionaries present on the bank, they cannot be outnumbered by cannibals (if they w</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">4 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-41-guess-color-of-hat/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle 41 | (Guess Color of Hat) </div> <div class="gfg-similar-read-item-subheading">There are 20 people standing in a line, one behind the other. Each is made to wear a hat, which can either be white or black. There can be any number of white or black hats between 0 and 20. Each person can see the hat of all the persons ahead of him in the line, but not those of the people standing</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">2 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-43-muddy-heads/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle 43 | Muddy Heads </div> <div class="gfg-similar-read-item-subheading">A mother tells her two children, a boy and a girl, to play without getting dirty. However, while playing, both children get mud on their foreheads. The mother says “At least one of you has a muddy forehead”. She then asks the children to answer “Yes” or “No” to the question: “Do you know whether you</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">2 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-heaven-hell/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle | Heaven and Hell </div> <div class="gfg-similar-read-item-subheading">There are two gates, one to hell and the other to heaven. Two gatekeepers, one for each gate. One of them always speaks the truth and the other always lies but you don't know which one guards which gate. You are allowed only one question and you need to find out the gate to heaven. What is the quest</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">1 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-mislabeled-jars/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle | Mislabeled Jars </div> <div class="gfg-similar-read-item-subheading">Puzzle : There are 3 jars, namely, A, B, C. All of them are mislabeled. Following are the labels of each of the jars: A: CandiesB: SweetsC: Candies and Sweets (mixed in a random proportion) You can put your hand in a jar and pick only one eatable at a time. Tell the minimum number of eatable(s) that</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">1 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-8-balls-problem/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle | 8 balls problem </div> <div class="gfg-similar-read-item-subheading">Puzzle: You are provided with 8 identical balls and a measuring instrument. 7 of the eight balls are equal in weight and one of the eight given balls is defective and weighs less. The task is to find the defective ball in exactly two measurements. Solution: Step 1: Divide the balls into three catego</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">2 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/cheryls-birthday-puzzle-and-solution/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle 51| Cheryl’s Birthday Puzzle and Solution </div> <div class="gfg-similar-read-item-subheading">(Wiki) Cheryl's Birthday is the unofficial name given to a mathematics brain teaser that was asked in the Singapore and Asian Schools Math Olympiad, and was posted online on 10 April 2015 by Singapore TV presenter. It is an interesting problem and might be asked in the interviews. It is based on log</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">3 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-measure-4l-using-given-3-buckets/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle | Measure 4L using given 3 buckets </div> <div class="gfg-similar-read-item-subheading">Suppose you have 8L, 5L and a 3L bucket with you. The buckets have no measurement lines on them and you are asked to measure exactly 4L of water using the three buckets. How could you measure exactly 4L water using only those buckets and provided you have as much extra water as you need ? Solution:-</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">3 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-3-priests-3-devils-puzzle/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle | 3 Priests and 3 devils Puzzle </div> <div class="gfg-similar-read-item-subheading">There are 3 devils and 3 Priests.They all have to cross a river in a boat.Boat can only carry two people at a time.As long as there are equal number of devils and priests,then devils will not eat Priest.If the number of devils are greater than the number of priests on the same side of the river then</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">2 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-farmer-goat-wolf-cabbage/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle | Farmer, Goat, Wolf and Cabbage </div> <div class="gfg-similar-read-item-subheading">There is a farmer who wishes to cross a river but he is not alone. He also has a goat, a wolf, and a cabbage along with him. There is only one boat available which can support the farmer and either of the goat, wolf or the cabbage. So at a time, the boat can have only two objects (farmer and one oth</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">3 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-water-jug-problem/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle | Water Jug Problem </div> <div class="gfg-similar-read-item-subheading">We have two water jugs, one measures 4 Gallons (4G) while the other measure 9 Gallons (9G). But there is no measuring label mentioned on either of these two jugs i.e. we cannot know the exact amount filled in the jug. Now, assuming there is an infinite amount of water supply, can we measure all 1G,</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">2 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-blind-man-and-pills/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle | Blind man and Pills </div> <div class="gfg-similar-read-item-subheading">Puzzle: A blind man is alone on a deserted island. He has two blue pills and two red pills. He must take exactly one red pill and one blue pill or he will die. How does he do it? Solution: Way 1: Firstly, break each of the pills in half, and as you do this pop one half in your mouth and lay the othe</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">2 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-the-burning-candles/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle | The Burning Candles </div> <div class="gfg-similar-read-item-subheading">Problem Statement: Given two candles. Each of them burns for one hour. They burn unevenly in different parts though. In addition, let's have a box of matches. Measure 45 minutes and 15 minutes. Solution: Step1: Both ends of the first candle should be lit, but only one end of the second candle should</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">2 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/birthday-puzzle/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Birthday Puzzle </div> <div class="gfg-similar-read-item-subheading">Puzzle:On a new year day, two old friends (A and B) meet at a party. As they met after a long time person B wanted person A to guess his birthday. As both friends are not in touch for a long time person A was unable to guess his birthday. So person B decided to give some hints. Below are the hints:</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">2 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-rat-and-poisonous-milk-bottles/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle | Rat and Poisonous Milk Bottles </div> <div class="gfg-similar-read-item-subheading">You have 4 bottles of milk. One of them is poisonous while the other 3 are non-poisonous. There is a rat which dies exactly after 10 hours of drinking the poisoned bottle. You have a clock that measures time only in hours. Suggest an optimal strategy to identify the poisoned bottle within 24 hours.</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">1 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/measuring-6l-water-4l-9l-buckets/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Measuring 6L water from 4L and 9L buckets </div> <div class="gfg-similar-read-item-subheading">Question: Suppose you have a 4 liter jug and a 9 liter bucket . The buckets have no measurement lines on them either. How could you measure exactly 6 liter using only those buckets and you have as much extra water as you need ? Solution: Consider 2 buckets one 4L and other 9L. : Bucket 1 (4L) and Bu</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">1 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-six-houses-p-q-r-s-t-and-u/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle | Six Houses P, Q, R, S, T, and U </div> <div class="gfg-similar-read-item-subheading">There are three houses on each side of the road. These six houses are labeled as P, Q, R, S, T, and U. The houses are of different colors, namely, Red, Blue, Green, Orange, Yellow, and White. The houses are of different heights. T, the tallest house, is exactly opposite to the Red-colored house.The</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">3 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/melting-candles-puzzle/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Melting Candles | Puzzle </div> <div class="gfg-similar-read-item-subheading">Problem Statement: There are two candles of equal lengths but of different thicknesses.The thicker candle lasts for 6 hours while the thinner one lasts for 2 hours lesser than the thicker one.A person lights the two candles at the same time and goes to play.After returning home, the person saw that</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">3 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-47-red-hat-vs-blue-hat/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle 47 | Red Hat vs Blue Hat </div> <div class="gfg-similar-read-item-subheading">A team of three people decide on a strategy for playing the following game. Each player walks into a room. On the way in, a fair coin is tossed for each player, deciding that player’s hat color, either red or blue. Each player can see the hat colors of the other two players, but cannot see her own h</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">3 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-find-the-culprit/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle | Find the Culprit </div> <div class="gfg-similar-read-item-subheading">Joe is a person who can't keep his secrets. He is that much careless that all his relatives and friends know his Debit Card PIN. Today Joe makes a profit of $1000. So he decided to throw a party and he invited his 3 friends: Leena, Paul, and Andrew. He was in a hurry to reach the home as soon as pos</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">2 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/fill-the-jug/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle 54 | Fill the Jug </div> <div class="gfg-similar-read-item-subheading">There are two jugs each of 4 and 3 liters respectively , without any measuring marks. how many minimum steps are required to have 2 liters of water into the 4 litre jug (the jugs can be filled any number of times with water, and they can be emptied any number of times). Note that this puzzle is diff</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">2 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-46-true-or-false/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle 46 | Rich or Poor </div> <div class="gfg-similar-read-item-subheading">A place has two kinds of residents, Poor, who always tell the truth, and their opposites, Rich, who always lie. You encounter two people A and B. What are A and B if A says “B is a Poor” and B says “The two of us are opposite types” ? Answer: Both A and B are Rich Solution: Let p and q be the statem</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">2 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-light-all-the-bulbs/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle | Light all the bulbs </div> <div class="gfg-similar-read-item-subheading">Problem Statement: Consider a circle with 2014 light bulbs and only 2 of them are on and the rest are off. Anyone can choose any of the bulbs and change the state of the neighboring bulbs. The task is to switch all the 2014 light bulbs on? Solution: Yes, it is possible to get all the light bulbs ON.</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">2 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-distribute-the-water/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle | Distribute the Water </div> <div class="gfg-similar-read-item-subheading">Problem Statement: Suppose there are three containers; container I (3L), container II (5L), container III (8L). Container III is filled with 8L of water while the other two are empty. With the help of these 3 containers, how to distribute the water in equal volumes i.e. 4L in container II and, 4L in</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">2 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-50-the-boat-wreckage/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle 50 | The Boat Wreckage </div> <div class="gfg-similar-read-item-subheading">Let’s make this one easy! Ankur with his friends went to river the bank of river Ganges, as the exams are over for fun and recreation. But while crossing to other side of the river, a storm came and he along with fourteen other people are trapped in a boat in the mid of the river. None of them know</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">2 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/weight-heavy-ball/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle | Weight of Heavy Ball </div> <div class="gfg-similar-read-item-subheading">Puzzle: There are 2187 balls, out of which 1 is heavy. Find the minimum number of attempts the balls have to be weighed for finding out the heavy ball. Solution: The minimum amount of measurements needed to be done will be equal to 7 times. 2187 = 3^7 Step 1: Divide the 2187 balls into 3 equal group</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">4 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-guess-the-bit-string/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle | Guess the bit string </div> <div class="gfg-similar-read-item-subheading">Puzzle: Your friend thinks of an N bit string that will refer to it as a code. The task is to guess the code by asking your friend a series of queries. In each query, you can provide your friend with an N bit string of your choice, and your friend will tell you the number of bits in your string that</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">3 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li></ul></div><div class="leftbar-dropdown"><h2 class="dropdown-title">Arrangement Puzzles<span class="gfg-icon gfg-icon_arrow-down-thin"></span></h2><ul style="display: none;"><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-11-1000-coins-and-10-bags/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle 11 | ( 1000 Coins and 10 Bags ) </div> <div class="gfg-similar-read-item-subheading">A dealer has 1000 coins and 10 bags. He has to divide the coins over the ten bags so that he can make any number of coins simply by handing over a few bags. How must divide his money into the ten bags? Solution: The idea of filling coins in the powers of 2 can be get from the condition that was give</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">2 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-23-days-of-month-using-2-dice/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle 23 | (Days of month using 2 dice) </div> <div class="gfg-similar-read-item-subheading">Puzzle: How can you represent days of month using two 6 sided dice? You can write one number on each face of the dice from 0 to 9 and you have to represent days from 1 to 31, for example for 1, one dice should show 0 and another should show 1, similarly for 29 one dice should show 2 and another shou</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">2 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-38-tic-tac-toe-puzzle/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle 38 | (Tic Tac Toe Puzzle) </div> <div class="gfg-similar-read-item-subheading">Statement: The game of Tic-Tac-Toe is being played between two players and it is in below state after six moves. Can you answer following questions? Who will win the game, O or X? Which was the sixth mark and at which position? Assume that both the players are intelligent enough. Solution: O will wi</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">1 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-30-last-palindrome-data/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle 30 | (Last Palindrome Date Before 10/02/2001) </div> <div class="gfg-similar-read-item-subheading">In year 2001 on October 2, 2001, the date in MMDDYYYY format was a palindrome (same forwards as backwards), 10/02/2001 -> "10022001" When was the last palindrome date before 10/02/2001? Answer: One year can have only one palindrome as the year fixes the month and date too, so the year has to be l</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">1 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-42-placing-the-numbers/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle 42 | (Placing the numbers) </div> <div class="gfg-similar-read-item-subheading">Place the numbers 1, 2, 3, 4, 5, 6, 7, 8 into the eight circles in figure given below, in such a way that no number is adjacent to a number that is next to it in the sequence.For example 1 should not be adjacent to 2 but can be adjacent to 3, 4, 5, 6, 7, 8. Similarly for others. We strongly recommen</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">2 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-10-balls-in-5-lines/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle | 10 Balls in 5 Lines </div> <div class="gfg-similar-read-item-subheading">Puzzle: Given are ten balls, the task is to place these 10 balls in five lines such that each line contain exactly 4 balls. Solution: The solution to the above puzzle can be obtained as: Draw the star with a pentagon in the centre. Place each ball at the intersection of extended lines of pentagon Th</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">1 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-round-table-coin-game/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle | (Round table coin game) </div> <div class="gfg-similar-read-item-subheading">Suppose two player, player A and player B have the infinite number of coins. Now they are sitting near a perfectly round table and going to play a game. The game is, in each turn, a player will put one coin anywhere on the table (not on the top of coin already placed on the table, but on the surface</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">1 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-place-numbers-1-to-9-in-a-circle-such-that-sum-of-every-triplet-in-straight-line-is-15/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle | Place numbers 1 to 9 in a Circle such that sum of every triplet in straight line is 15 </div> <div class="gfg-similar-read-item-subheading">Place the numbers 1 to 9 in a circle, so that wherever there are three in a straight line they shall add up to 15. SOLUTION:[video mp4="https://media.geeksforgeeks.org/wp-content/uploads/20200710130155/wpv.mp4"][/video]The sum of first number and last number is ten ( 1 + 9 = 10 ).Similarly, the sum</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">2 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li></ul></div><div class="leftbar-dropdown"><h2 class="dropdown-title">Shape based Puzzles<span class="gfg-icon gfg-icon_arrow-down-thin"></span></h2><ul style="display: none;"><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-21-3-ants-and-triangle/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle 21 | (3 Ants and Triangle) </div> <div class="gfg-similar-read-item-subheading">There are 3 ants sitting on three corners of a triangle. All ants randomly pick a direction and start moving along edge of the triangle. What is the probability that any two ants collide? Hint: Every ant has two choices (pick either of two edges going through the corner on which ant is initially sit</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">1 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-3-cuts-cut-round-cake-8-equal-pieces/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle | 3 cuts to cut round cake into 8 equal pieces </div> <div class="gfg-similar-read-item-subheading">Puzzle: You have a birthday cake and have to cut it into 8 equal pieces by making 3 cuts only. How do you do it? Solution: The solution can be divided into 3 basic steps. But apart from this there are also other method of executing this task. Step 1: Cut the cake into quarters (4 pieces) using 2 of</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">1 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-25chessboard-and-dominos/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle 25 | (Chessboard and dominos) </div> <div class="gfg-similar-read-item-subheading">There is an 8 by 8 chessboard in which two diagonally opposite corners have been cut off. You are given 31 dominos, and a single domino can cover exactly two squares. Can you use the 31 dominos to cover the entire board? Answer: No Explanation: At first, it seems that there were 8*8 = 64 squares the</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">1 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-three-squares/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle | Three Squares </div> <div class="gfg-similar-read-item-subheading">Given four sticks of length 'a' and four more sticks of length 'b'. The length of 'b' is exactly half of the length of 'a'. The task is to make three equal squares using the given 8 sticks. Solution: Below are the steps to make three equal squares from the given sticks: 1. Place the first stick of l</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">1 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-maximum-pieces-that-can-be-cut-from-a-circle-using-6-straight-lines/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle | Maximum pieces that can be cut from a Circle using 6 straight lines </div> <div class="gfg-similar-read-item-subheading">PUZZLE: Given a Circle and Six Straight Lines. What is the maximum number of pieces that one can cut the circle using these six straight lines? SOLUTION: Using six lines, we can cut the circle into 22 pieces at maximum. Using one line, the circle can be divided into two parts.Two lines divide the ci</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">1 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-splitting-a-cake-with-a-missing-piece-in-two-equal-portion/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle | Splitting a Cake with a Missing Piece in two equal portion </div> <div class="gfg-similar-read-item-subheading">Problem Statement: There are three friends who ordered a rectangular cake. One of them was in a hurry so he cut a rectangular piece from the cake. The piece could be of any arbitrary size(less than the size of the cake) and rotation. Now the remaining two friends want to divide the remaining cake in</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">1 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-48-rectangular-cardboard/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle 48 | Rectangular Cardboard </div> <div class="gfg-similar-read-item-subheading">Given, a rectangular cardboard with a rectangular piece removed(of any size and orientation) how one can cut the rectangular cardboard in two equal parts with one straight line cut. Solution: Using the fact: that “any line passing through the center of a rectangle divides the rectangle into two equa</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">1 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/puzzle-dividing-a-square-into-n-smaller-squares/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Puzzle | Dividing a Square into N smaller squares </div> <div class="gfg-similar-read-item-subheading">Puzzle: Find all values of N for which one can dissect a square into N smaller squares, and outline an algorithm for doing such a dissection. Solution: The basic point to observe is a square has 4 right-angles. So, to divide it into smaller squares each of its right-angle must fall into another squa</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">2 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li></ul></div><div class="leftbar-dropdown"><h2 class="dropdown-title">Rubik's Cube<span class="gfg-icon gfg-icon_arrow-down-thin"></span></h2><ul style="display: none;"><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/algorithm-to-solve-rubiks-cube/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Algorithm to solve Rubik's Cube </div> <div class="gfg-similar-read-item-subheading">A Rubik's Cube is an interesting puzzle invented by 'Erno Rubik' which has 43 quintillion possible configurations. But with the use of certain algorithms, it can be solved easily. There are many variations of the Rubix cube nowadays but the most basic one is the 3x3x3 Rubik's cube. A 3x3x3 Rubik's c</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">4 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/rubiks-cube-facts-and-questions/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Rubik's Cube Facts and Questions </div> <div class="gfg-similar-read-item-subheading">What is a Rubik's Cube?The Rubik’s Cube is a 3-D combination Puzzle that was invented in 1974 by Hungarian sculptor and professor of architecture ErnÅ‘ Rubik. Rubik’s Cube is a Puzzle with a six-coloured cube, whose faces each include nine squares, eight of which can be rotated separately. In this ar</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">5 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li></ul></div><div class="leftbar-dropdown"><h2 class="dropdown-title">Brain Teasers<span class="gfg-icon gfg-icon_arrow-down-thin"></span></h2><ul style="display: none;"><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/brain-teasers/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Brain Teasers </div> <div class="gfg-similar-read-item-subheading">What are Brain Teasers? Brain teasers are puzzles or problems that are designed to stimulate and challenge the brain. They often require creative thinking, problem-solving skills, and the ability to think outside the box. Brain teasers come in various forms, including riddles, puzzles, and logic gam</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">6 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/20-challenging-brain-teasers-with-answers/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">20 Challenging Brain Teasers with Answers </div> <div class="gfg-similar-read-item-subheading">Brain teasers are puzzles or problems that are designed to stimulate and challenge the brain. They often require creative thinking, problem-solving skills, and the ability to think outside the box. Brain teasers come in various forms, including riddles, puzzles, and logic games. They are a fun way t</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">8 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li></ul></div><div class="leftbar-dropdown"><h2 class="dropdown-title">Crossword Puzzle<span class="gfg-icon gfg-icon_arrow-down-thin"></span></h2><ul style="display: none;"><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/crossword-puzzle-of-the-week-1-for-dsa/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Crossword Puzzle Of The Week #1 (for DSA) </div> <div class="gfg-similar-read-item-subheading">In this issue of Crossword Puzzle of the week, we will dive into the topics of Data Structures and Algorithms (DSA). The solution to the crossword puzzle is provided at the end. HINTS: Down: 1. A ______ is like a line waiting to purchase tickets, where the first person in line is the first person se</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">2 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/crossword-puzzle-of-the-week-2-for-computer-science-and-applications/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Crossword Puzzle Of The Week #2 (for Computer Science and Applications) </div> <div class="gfg-similar-read-item-subheading">In this issue of Crossword Puzzle of the week, we will dive into the topics of Computer Science and Applications. The solution to the crossword puzzle is provided at the end. HINTS: ACROSS:1. The ........ number system consists of at most10 digits.2. In Symmetric Key Cryptography, same key can be us</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">1 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/crossword-puzzle-of-the-week-3-for-database-and-queries/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Crossword Puzzle Of The Week #3 (for Database and Queries) </div> <div class="gfg-similar-read-item-subheading">In this issue of Crossword Puzzle of the week, we will dive into the topics of Database and Queries. The solution to the crossword puzzle is provided at the end. HINTS: DOWN: 1. _______ gives a logical structure of the database graphically?2. _______ is the SQL command that is used for storing chang</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">1 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/crossword-puzzle-of-the-week-4-for-object-oriented-programming/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Crossword Puzzle Of The Week #4 (for Object Oriented Programming) </div> <div class="gfg-similar-read-item-subheading">In this issue of Crossword Puzzle of the week, we will dive into the topics of Object Oriented Programming. The solution to the crossword puzzle is provided at the end. HINTS: DOWN 1. The class members declared as _____ can be accessed only by the member functions inside the class2. A ______is a col</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">2 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/crossword-puzzle-of-the-week-5-for-operating-system/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Crossword Puzzle Of The Week #5 (for Operating System) </div> <div class="gfg-similar-read-item-subheading">In this issue of Crossword Puzzle of the week, we will dive into the topics of Operating Systems. The solution to the crossword puzzle is provided at the end. HINTS: DOWN 1. Part of the operating system which is responsible for file management.2. A _____ is a running program that serves as the found</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">2 min read</span> </div> </a><hr style="background:var(--gfg-selected-color); width:70%; margin: 0 auto;"></li></ul></div><li class="similarReadDropdownItem"><a href="https://www.geeksforgeeks.org/top-100-puzzles-asked-in-interviews/?ref=lbp"><div class="gfg-similar-read-item-content"> <div class="gfg-similar-read-item-heading">Top 100 Puzzles Asked In Interviews </div> <div class="gfg-similar-read-item-subheading">Puzzles are asked in Interviews to check our problem-solving skills. Here we are providing you with the top 100 puzzles that are asked in Interviews. The main aim of puzzles is entertainment. Puzzles can be of many types:- picture puzzles, logical puzzles, mathematical puzzles, etc. It is very helpf</div> </div> <div class="reading-time"> <i class="reading-time-icon" data-gfg-action="readingtime"></i> <span style="color: var(--recommendation-card-text-color);font-size: 14px;font-weight: 500;line-height: 17px;">4 min read</span> </div> </a></li></div></ul> </div> </div> <div class="vote-wrap"> <div style="display:none;align-items:center;justify-content:center;width:100%;"> <button aria-label="like" data-type="like" class="vote-this" style="margin-right: 0; margin-left:0 ;"> <i class="gfg-icon gfg-icon_like favoriteIcon"></i> <span class="favoriteLike">Like</span> <figure class="favoriteText"></figure> </button> </div> </div> </div> <div class="article-meta"> <div class="bottom-wrap"> <div id="GFG_AD_InContent_Desktop_BTF_650x250" style="text-align:center;max-height: 300px;"></div> </div> <!-- end --> </div> </div> </div> </div> <div id="report_modal_content" class="report_modal_content" style="display:hidden;"></div> <div class="onopen-discussion-panel"> <div class="discussion-tab"> <div class="discussion_heading"> <div></div> <i class="gfg-icon close-tab-icon"></i> </div> <div class="discussion_content"> <div style="height:100%"> <div style="height:100%" id="comment-system"></div> </div> </div> </div> </div> <div class="rightBar" style="padding-right: 5px;"> <style> .article--container_content{ align-items: unset !important; } .sideBar { position: sticky !important; } .gfg-icon_switch::after { background-position: -40px -281px !important; } .gfg-icon_transaction::after { background-position: -40px -321px !important; } .header-main__profile.selected+.mega-dropdown{ width: 225px !important; } #courses-container .course-price{ display:none; } /* .side--container_wscard .card-content .content .meta:empty, .practiceBannerFromPlugin{ display:none !important; } */ .side--container_wscard .card-content .content .meta{ display:block !important; } .side--container_wscard .card-content .content .meta p{ background-color: rgba(254, 212, 91, 0.6); font-size: 10pt; font-weight: bold; display: inline-block; color: var(--color-black); margin-top: 15px; padding: 0px 5px; } #try-it{ display:initial !important; } #try-it .try-it-div{ line-height: 34px; } .gfg-icon_dark-mode::after { background-position: -40px -680px; } .side--container_wscard .head{ font-size: 14px !important; } .nineDot-menu, .gfg-icon_ndot{ display: none; } #text-15{ flex-direction: column; } .mtq_correct_marker, .mtq_wrong_marker{ display: none; } .sidebar_wrapper > :last-child{ margin: unset !important; margin-left: 5px !important; margin-top: 20px !important; top: 70px !important; } .darkMode-wrap{ bottom:1% !important; } #secondary .textwidget{ margin-left: auto; margin-right: 0; text-align: right; } #secondary .widget_text:last-child{ top: 70px !important; } @media(max-width:768px){ #scrollTopBtn{ display:none !important; } } .rightbar_loggedin_promo_cta{ display:flex; cursor:pointer; margin-bottom:20px; } </style> <div id="secondary" class="widget-area"> <div class='OINTechPromoRightBarBanner' id='rightBarSaleBanner' style='text-align:right; margin-bottom:5px;'><a href=https://www.geeksforgeeks.org/geeksforgeeks-premium-subscription?itm_source=geeksforgeeks&itm_medium=rightbar_oin&itm_campaign=premium><img src=https://media.geeksforgeeks.org/auth-dashboard-uploads/premium_oin_rbar_min.png alt='three90RightbarBannerImg' style='width:300px; height:250px;'></a></div> <!------------------------ text-15 (for Ads) ------------------------ --> <aside id="text-15" class="widget widget_text"> <div class="textwidget"> <div id="_GFG_ABP_Desktop_RightSideBar_ATF_300x600_2"></div> <div id="GFG_AD_Desktop_RightSideBar_ATF_300x250_2" style="min-width: 300px;margin-bottom:10px;"></div> <div id='GFG_AD_Desktop_RightSideBar_ATF_300x600' style='min-width: 300px; min-height: 600px;margin-bottom:10px;'></div> </div> </aside> <!------------------------ text-16 (For Ads)------------------------ --> <aside id="text-16" class="widget widget_text"> <div class="textwidget"> <div id="_GFG_ABP_Desktop_RightSideBar_MTF_300x600"></div> <div id='GFG_AD_Desktop_RightSideBar_MTF_300x250' style='min-width: 300px;'></div> <div id="_GFG_ABP_Desktop_RightSideBar_BTF_300x600"></div> <div id="_GFG_ABP_Desktop_RightSideBar_BTF_300x600_3"></div> </div> </aside> <!-- ---------------------- courses section ------------------------- --> <!-- <script> var rightBarExploreMoreList = `` </script> --> <!-------------------------------- Text-18 (explore more section + ads) ---------------------------> <aside id="text-18" class="widget widget_text"> <div class="textwidget"> <div id='GFG_AD_Desktop_RightSideBar_BTF_Sticky_300x250' style='min-width: 300px;margin-bottom:10px'></div> <div id='GFG_AD_Desktop_RightSideBar_Docked_160x600' style='min-width: 160px;'></div><div id='GFG_AD_Desktop_RightSideBar_BTFdocked_300x600' style='min-width: 300px;'></div> </aside> <!-------------------------- Text -20 (For maintaining some CSS) ---------------------- --> <aside id="text-20" class="widget widget_text"> <div class="textwidget"> <!-- Please do not delete this div --> </div> </aside> </div> <div id="user-personal-note" style="display: none;"></div> </div> </div> <section class="disqus-section"> <div class="article-page_flex"> <div class="leftBar"> </div> </div> </section> </div> <div id="video-popup" style="display:none"></div> <link rel="stylesheet" href='https://www.geeksforgeeks.org/wp-content/themes/iconic-one/css/articleList.min.css?ver=1.7'> <script> $(document).ready(function() { var isfollowingApiCall = false; if ($('.follow-btn').length) { var articleRecommendedTop = $(".article--recommended").offset().top; var articleRecommendedBottom = articleRecommendedTop + $(".article--recommended").outerHeight(); $(window).scroll(function() { var top_of_element = $(".article--recommended").offset().top; var bottom_of_element = $(".article--recommended").offset().top + $(".article--recommended").outerHeight(); var bottom_of_screen = $(window).scrollTop() + $(window).innerHeight(); var top_of_screen = $(window).scrollTop(); if ((bottom_of_screen > top_of_element && top_of_screen < bottom_of_element) || (bottom_of_screen > articleRecommendedTop && top_of_screen < articleRecommendedBottom) || (top_of_screen > articleRecommendedBottom)) { if (!isfollowingApiCall) { isfollowingApiCall = true; setTimeout(function(){ if (loginData && loginData.isLoggedIn) { if (loginData.userName !== $('#followAuthor').val()) { is_following(); } else { $('.profileCard-profile-picture').css('background-color', '#E7E7E7'); } } else { $('.follow-btn').removeClass('hideIt'); } }, 3000); } } }); } $(".accordion-header").click(function() { var arrowIcon = $(this).find('.bottom-arrow-icon'); arrowIcon.toggleClass('rotate180'); }); }); window.isReportArticle = false; function report_article(){ if (!loginData || !loginData.isLoggedIn) { const loginModalButton = $('.login-modal-btn') if (loginModalButton.length) { loginModalButton.click(); } return; } if(!window.isReportArticle){ //to add loader $('.report-loader').addClass('spinner'); jQuery('#report_modal_content').load(gfgSiteUrl+'wp-content/themes/iconic-one/report-modal.php', { PRACTICE_API_URL: practiceAPIURL, PRACTICE_URL:practiceURL },function(responseTxt, statusTxt, xhr){ if(statusTxt == "error"){ alert("Error: " + xhr.status + ": " + xhr.statusText); } }); }else{ window.scrollTo({ top: 0, behavior: 'smooth' }); $("#report_modal_content").show(); } } function closeShareModal() { const shareOption = document.querySelector('[data-gfg-action="share-article"]'); shareOption.classList.remove("hover_share_menu"); let shareModal = document.querySelector(".hover__share-modal-container"); shareModal && shareModal.remove(); } function openShareModal() { closeShareModal(); // Remove existing modal if any let shareModal = document.querySelector(".three_dot_dropdown_share"); shareModal.appendChild(Object.assign(document.createElement("div"), { className: "hover__share-modal-container" })); document.querySelector(".hover__share-modal-container").append( Object.assign(document.createElement('div'), { className: "share__modal" }), ); document.querySelector(".share__modal").append(Object.assign(document.createElement('h1'), { className: "share__modal-heading" }, { textContent: "Share to" })); const socialOptions = ["LinkedIn", "WhatsApp", "Copy Link"]; socialOptions.forEach((socialOption) => { const socialContainer = Object.assign(document.createElement('div'), { className: "social__container" }); const icon = Object.assign(document.createElement("div"), { className: `share__icon share__${socialOption.split(" ").join("")}-icon` }); const socialText = Object.assign(document.createElement("span"), { className: "share__option-text" }, { textContent: `${socialOption}` }); const shareLink = (socialOption === "Copy Link") ? Object.assign(document.createElement('div'), { role: "button", className: "link-container CopyLink" }) : Object.assign(document.createElement('a'), { className: "link-container" }); if (socialOption === "LinkedIn") { shareLink.setAttribute('href', `https://www.linkedin.com/sharing/share-offsite/?url=${window.location.href}`); shareLink.setAttribute('target', '_blank'); } if (socialOption === "WhatsApp") { shareLink.setAttribute('href', `https://api.whatsapp.com/send?text=${window.location.href}`); shareLink.setAttribute('target', "_blank"); } shareLink.append(icon, socialText); socialContainer.append(shareLink); document.querySelector(".share__modal").appendChild(socialContainer); //adding copy url functionality if(socialOption === "Copy Link") { shareLink.addEventListener("click", function() { var tempInput = document.createElement("input"); tempInput.value = window.location.href; document.body.appendChild(tempInput); tempInput.select(); tempInput.setSelectionRange(0, 99999); // For mobile devices document.execCommand('copy'); document.body.removeChild(tempInput); this.querySelector(".share__option-text").textContent = "Copied" }) } }); document.querySelector(".hover__share-modal-container").addEventListener("mouseover", () => document.querySelector('[data-gfg-action="share-article"]').classList.add("hover_share_menu")); } function toggleLikeElementVisibility(selector, show) { document.querySelector(`.${selector}`).style.display = show ? "block" : "none"; } function closeKebabMenu(){ document.getElementById("myDropdown").classList.toggle("show"); } </script> <!-- Script for the new design of similar read --> <script> $(document).ready(function() { $("#showMoreTagsBtn").click(function() { $('.articles-hidden-tags').show(); $(this).hide(); }); $("#showMorePracticeTagsBtn").click(function() { $(".practice-tags li:nth-child(n+5)").show(); $(this).hide(); }); }); </script> <!-- Script end for similar read --> <style> .grecaptcha-badge { visibility: hidden !important; } .thank-you-message { height: 100%; display:flex; flex-direction: column; justify-content: center; align-items: center; } .thank-you-message-content { margin-top: 17px; font: 400 20px var(--font-secondary); color: var(--improve-modal-text); line-height: 180%; text-align: center; } .thank-you-message-content h2{ font-family: var(--font-secondary); } .all-footer-information{ width: 100% !important;; } .footer-wrapper_links-list{ margin-block-start: 0em !important; width: 16% !important; padding-inline-start: 18px !important; } .link-head{ margin-bottom: 0px; } @media only screen and (max-width:1340px) { .footer-wrapper_links-list{ overflow-wrap: break-word; } } @media screen and (min-width: 991px) { .all-footer-information{ padding-left:15px; } } @media only screen and (max-width:980px) { .footer-wrapper_branding-address{ padding-top: 10px; } } @media (max-width: 750px) { .thank-you-message-content{ font-size: 14px; line-height: 170%; } } /* CSS variable meant to handle the dark and light mode icon for three 90 event in header courses dropdown */ :root{ --three90headericon : url('https://media.geeksforgeeks.org/auth-dashboard-uploads/three90daylogocompressed.svg'); --three90headericonposition : 0px -40px; --three90leftbarimggrid : url('https://media.geeksforgeeks.org/auth-dashboard-uploads/three90leftbarspritecompressed.svg'); --three90leftbarimgposition : -5px -55px; --three90leftbarbgcolour : #b3abd0; } body[data-dark-mode="true"]{ --three90leftbarimgposition : -6px 1px; --three90headericonposition : 0px 0px; --three90leftbarbgcolour: #8c82b9; } .three90leftbarimg{ margin-left: -5px; height: 30px; background-image: var(--three90leftbarimggrid); background-repeat: no-repeat; background-position: var(--three90leftbarimgposition); background-size: 212px; } .courseTabShimmer{ position: absolute; height: 110%; width: 0; opacity: .7; -webkit-animation: courseShimmer 2s cubic-bezier(0,0,.07,.61) infinite; animation: courseShimmer 2s cubic-bezier(0,0,.07,.61) infinite; box-shadow: 0 0 25px 5px #dddcdc; -webkit-transform: rotate(90deg); transform: rotate(90deg); padding:0px !important; border:unset !important; } @keyframes courseShimmer{ 0% { left: 0; } 55% { left: 100%; } 99% { left: 110%; } } </style> </div><!-- #main .wrapper --> <div id="displayModal" class="modal fade" role="dialog"> <div class="modal-dialog"> <!-- <div class="upper-box"> <h3 style="font: normal normal bold 18px/31px var(--font-primary); color: var(--color-black);">Improve your Coding Skills with Practice</h3> <button class="upper-box-btn"><a style="color: white !important;" href="https://practice.geeksforgeeks.org/explore?page=1&sortBy=submissions&utm_source=gfg&utm_medium=search-bar&utm_campaign=practice-search">Try It!</a></button> </div> --> <div class="modal-content"> <div class="error-message"></div> <!-- <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" data-modal="displayModal">×</button> <h2 class="modal-title" id="dmTitle"></h2> </div> --> <div class="modal-body" id="dmBody"> <div id="modal-dm-content"></div> <div class="modal-overlay" aria-hidden=true> <span class="loader__animation"></span> </div> <!-- body --> </div> </div> </div> </div> <div id="displayModalBackdrop" class="backdrop"></div> <!-- Footer start --> <footer class="gfg-footer" id="gfg-footer"> <div class="footer-wrapper"> <div class="footer-wrapper_branding"> <a class="footer-wrapper_branding-anchor" aria-label="GeeksforGeeks Logo" href="https://www.geeksforgeeks.org/"> <img style="height: 32px; width: 230px; max-width: fit-content;" class="footer-wrapper_branding-nlogo" src="https://media.geeksforgeeks.org/auth-dashboard-uploads/gfgFooterLogo.png" alt="geeksforgeeks-footer-logo"/> </a> <div class="footer-wrapper_branding-address"> <div class="address_section"> <div class="address-icon-wrapper"> <i class="gfg-icon gfg-icon_pin"></i> <div class="address_div"> <div class="address_name">Corporate & Communications Address:</div> <div class="footer-address"> A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305) </div> </div> </div> <div class="address-icon-wrapper"> <i class="gfg-icon gfg-icon_pin"></i> <div class="address_div"> <div class="address_name">Registered Address:</div> K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305 </div> </div> </div> </div> <div class="footer-wrapper_branding-social"> <a href="https://www.facebook.com/geeksforgeeks.org/" rel="noopener noreferrer" aria-label="GeeksforGeeks Facebook" target="_blank"> <div class="facebook"></div> </a> <a href="https://www.instagram.com/geeks_for_geeks/" rel="noopener noreferrer" aria-label="GeeksforGeeks Instagram" target="_blank"> <div class="instagram"></div> </a> <a href="https://in.linkedin.com/company/geeksforgeeks" rel="noopener noreferrer" aria-label="GeeksforGeeks LinkedIn" target="_blank"> <div class="linkedin"></div> </a> <a href="https://twitter.com/geeksforgeeks" rel="noopener noreferrer" aria-label="GeeksforGeeks Twitter" target="_blank"> <div class="twitter"></div> </a> <a href="https://www.youtube.com/geeksforgeeksvideos" rel="noopener noreferrer" aria-label="GeeksforGeeks YouTube" target="_blank"> <div class="youtube"></div> </a> </div> <div class="footer-wrapper_branding-app"> <a aria-label="GeeksforGeeks App Link" href="https://geeksforgeeksapp.page.link/gfg-app" target="_blank" ><img src="https://media.geeksforgeeks.org/auth-dashboard-uploads/googleplay.png" alt="GFG App on Play Store" id="gplay" loading="lazy"></a> <a aria-label="GeeksforGeeks App Link" href="https://geeksforgeeksapp.page.link/gfg-app" target="_blank"><img src="https://media.geeksforgeeks.org/auth-dashboard-uploads/appstore.png" alt="GFG App on App Store" id="appstore" loading="lazy"></a> </div> <div class="footer_advertise_btn_box"> <a href="https://www.geeksforgeeks.org/advertise-with-us/?ref=footer" target="_blank" class="footer_advertise_btn">Advertise with us</a> </div> </div> <div class="all-footer-information"> <div class="footer-wrapper_links" style="justify-content: space-between; text-align: -webkit-left;"><ul class="footer-wrapper_links-list" ><li>Company</li><li><a href=https://www.geeksforgeeks.org/about/?ref=outindfooter>About Us</a></li><li><a href=https://www.geeksforgeeks.org/legal/?ref=outindfooter>Legal</a></li><li><a href=https://www.geeksforgeeks.org/legal/privacy-policy/?ref=outindfooter>Privacy Policy</a></li><li><a href=https://www.geeksforgeeks.org/press-release/?ref=outindfooter>In Media</a></li><li><a href=https://www.geeksforgeeks.org/about/contact-us/?ref=outindfooter>Contact Us</a></li><li><a href=https://www.geeksforgeeks.org/advertise-with-us/?ref=outindfooter>Advertise with us</a></li><li><a href=https://www.geeksforgeeks.org/gfg-corporate-solution/?ref=outindfooter>GFG Corporate Solution</a></li><li><a href=https://www.geeksforgeeks.org/campus-training-program/?ref=outindfooter>Placement Training Program</a></li><li><a href=https://www.geeksforgeeks.org/community/?ref=outindfooter>GeeksforGeeks Community</a></li></ul><ul class="footer-wrapper_links-list" ><li><a class="link-head" href=https://www.geeksforgeeks.org/introduction-to-programming-languages/?ref=outindfooter>Languages</a></li><li><a href=https://www.geeksforgeeks.org/python-programming-language/?ref=outindfooter>Python</a></li><li><a href=https://www.geeksforgeeks.org/java/?ref=outindfooter>Java</a></li><li><a href=https://www.geeksforgeeks.org/c-plus-plus/?ref=outindfooter>C++</a></li><li><a href=https://www.geeksforgeeks.org/php-tutorials/?ref=outindfooter>PHP</a></li><li><a href=https://www.geeksforgeeks.org/golang/?ref=outindfooter>GoLang</a></li><li><a href=https://www.geeksforgeeks.org/sql-tutorial/?ref=outindfooter>SQL</a></li><li><a href=https://www.geeksforgeeks.org/r-tutorial/?ref=outindfooter>R Language</a></li><li><a href=https://www.geeksforgeeks.org/android-tutorial/?ref=outindfooter>Android Tutorial</a></li><li><a href=https://www.geeksforgeeks.org/geeksforgeeks-online-tutorials-free/?ref=outindfooter>Tutorials Archive</a></li></ul><ul class="footer-wrapper_links-list" ><li><a class="link-head" href=https://www.geeksforgeeks.org/learn-data-structures-and-algorithms-dsa-tutorial/?ref=outindfooter>DSA</a></li><li><a href=https://www.geeksforgeeks.org/data-structures/?ref=outindfooter>Data Structures</a></li><li><a href=https://www.geeksforgeeks.org/fundamentals-of-algorithms/?ref=outindfooter>Algorithms</a></li><li><a href=https://www.geeksforgeeks.org/complete-guide-to-dsa-for-beginners/?ref=outindfooter>DSA for Beginners</a></li><li><a href=https://www.geeksforgeeks.org/basic-coding-problems-in-dsa-for-beginners/?ref=outindfooter>Basic DSA Problems</a></li><li><a href=https://www.geeksforgeeks.org/complete-roadmap-to-learn-dsa-from-scratch/?ref=outindfooter>DSA Roadmap</a></li><li><a href=https://www.geeksforgeeks.org/top-100-data-structure-and-algorithms-dsa-interview-questions-topic-wise/?ref=outindfooter>Top 100 DSA Interview Problems</a></li><li><a href=https://www.geeksforgeeks.org/dsa-roadmap-for-beginner-to-advanced-by-sandeep-jain/?ref=outindfooter>DSA Roadmap by Sandeep Jain</a></li><li><a href=https://www.geeksforgeeks.org/geeksforgeeks-master-sheet-list-of-all-cheat-sheets/?ref=outindfooter>All Cheat Sheets</a></li></ul><ul class="footer-wrapper_links-list" ><li><a class="link-head" href=https://www.geeksforgeeks.org/ai-ml-ds/?ref=outindfooter>Data Science & ML</a></li><li><a href=https://www.geeksforgeeks.org/data-science-tutorial/?ref=outindfooter>Data Science With Python</a></li><li><a href=https://www.geeksforgeeks.org/data-science-for-beginners/?ref=outindfooter>Data Science For Beginner</a></li><li><a href=https://www.geeksforgeeks.org/machine-learning/?ref=outindfooter>Machine Learning</a></li><li><a href=https://www.geeksforgeeks.org/machine-learning-mathematics/?ref=outindfooter>ML Maths</a></li><li><a href=https://www.geeksforgeeks.org/python-data-visualization-tutorial/?ref=outindfooter>Data Visualisation</a></li><li><a href=https://www.geeksforgeeks.org/pandas-tutorial/?ref=outindfooter>Pandas</a></li><li><a href=https://www.geeksforgeeks.org/numpy-tutorial/?ref=outindfooter>NumPy</a></li><li><a href=https://www.geeksforgeeks.org/natural-language-processing-nlp-tutorial/?ref=outindfooter>NLP</a></li><li><a href=https://www.geeksforgeeks.org/deep-learning-tutorial/?ref=outindfooter>Deep Learning</a></li></ul><ul class="footer-wrapper_links-list" ><li><a class="link-head" href=https://www.geeksforgeeks.org/web-technology/?ref=outindfooter>Web Technologies</a></li><li><a href=https://www.geeksforgeeks.org/html/?ref=outindfooter>HTML</a></li><li><a href=https://www.geeksforgeeks.org/css/?ref=outindfooter>CSS</a></li><li><a href=https://www.geeksforgeeks.org/javascript/?ref=outindfooter>JavaScript</a></li><li><a href=https://www.geeksforgeeks.org/typescript/?ref=outindfooter>TypeScript</a></li><li><a href=https://www.geeksforgeeks.org/learn-reactjs/?ref=outindfooter>ReactJS</a></li><li><a href=https://www.geeksforgeeks.org/nextjs/?ref=outindfooter>NextJS</a></li><li><a href=https://www.geeksforgeeks.org/bootstrap/?ref=outindfooter>Bootstrap</a></li><li><a href=https://www.geeksforgeeks.org/web-design/?ref=outindfooter>Web Design</a></li></ul><ul class="footer-wrapper_links-list" ><li><a class="link-head" href=https://www.geeksforgeeks.org/python-programming-language/?ref=outindfooter>Python Tutorial</a></li><li><a href=https://www.geeksforgeeks.org/python-programming-examples/?ref=outindfooter>Python Programming Examples</a></li><li><a href=https://www.geeksforgeeks.org/python-projects-beginner-to-advanced/?ref=outindfooter>Python Projects</a></li><li><a href=https://www.geeksforgeeks.org/python-tkinter-tutorial/?ref=outindfooter>Python Tkinter</a></li><li><a href=https://www.geeksforgeeks.org/python-web-scraping-tutorial/?ref=outindfooter>Web Scraping</a></li><li><a href=https://www.geeksforgeeks.org/opencv-python-tutorial/?ref=outindfooter>OpenCV Tutorial</a></li><li><a href=https://www.geeksforgeeks.org/python-interview-questions/?ref=outindfooter>Python Interview Question</a></li><li><a href=https://www.geeksforgeeks.org/django-tutorial/?ref=outindfooter>Django</a></li></ul></div><div class="footer-wrapper_links" style="justify-content: space-between; text-align: -webkit-left;"><ul class="footer-wrapper_links-list" style="margin-block-start: 0em; width:16%; padding-inline-start: 18px;"><li>Computer Science</li><li><a href=https://www.geeksforgeeks.org/operating-systems/?ref=outindfooter>Operating Systems</a></li><li><a href=https://www.geeksforgeeks.org/computer-network-tutorials/?ref=outindfooter>Computer Network</a></li><li><a href=https://www.geeksforgeeks.org/dbms/?ref=outindfooter>Database Management System</a></li><li><a href=https://www.geeksforgeeks.org/software-engineering/?ref=outindfooter>Software Engineering</a></li><li><a href=https://www.geeksforgeeks.org/digital-electronics-logic-design-tutorials/?ref=outindfooter>Digital Logic Design</a></li><li><a href=https://www.geeksforgeeks.org/engineering-mathematics-tutorials/?ref=outindfooter>Engineering Maths</a></li><li><a href=https://www.geeksforgeeks.org/software-development/?ref=outindfooter>Software Development</a></li><li><a href=https://www.geeksforgeeks.org/software-testing-tutorial/?ref=outindfooter>Software Testing</a></li></ul><ul class="footer-wrapper_links-list" ><li><a class="link-head" href=https://www.geeksforgeeks.org/devops-tutorial/?ref=outindfooter>DevOps</a></li><li><a href=https://www.geeksforgeeks.org/git-tutorial/?ref=outindfooter>Git</a></li><li><a href=https://www.geeksforgeeks.org/linux-tutorial/?ref=outindfooter>Linux</a></li><li><a href=https://www.geeksforgeeks.org/aws-tutorial/?ref=outindfooter>AWS</a></li><li><a href=https://www.geeksforgeeks.org/docker-tutorial/?ref=outindfooter>Docker</a></li><li><a href=https://www.geeksforgeeks.org/kubernetes-tutorial/?ref=outindfooter>Kubernetes</a></li><li><a href=https://www.geeksforgeeks.org/microsoft-azure/?ref=outindfooter>Azure</a></li><li><a href=https://www.geeksforgeeks.org/google-cloud-platform-tutorial/?ref=outindfooter>GCP</a></li><li><a href=https://www.geeksforgeeks.org/devops-roadmap/?ref=outindfooter>DevOps Roadmap</a></li></ul><ul class="footer-wrapper_links-list" ><li><a class="link-head" href=https://www.geeksforgeeks.org/system-design-tutorial/?ref=outindfooter>System Design</a></li><li><a href=https://www.geeksforgeeks.org/what-is-high-level-design-learn-system-design/?ref=outindfooter>High Level Design</a></li><li><a href=https://www.geeksforgeeks.org/what-is-low-level-design-or-lld-learn-system-design/?ref=outindfooter>Low Level Design</a></li><li><a href=https://www.geeksforgeeks.org/unified-modeling-language-uml-introduction/?ref=outindfooter>UML Diagrams</a></li><li><a href=https://www.geeksforgeeks.org/system-design-interview-guide/?ref=outindfooter>Interview Guide</a></li><li><a href=https://www.geeksforgeeks.org/software-design-patterns/?ref=outindfooter>Design Patterns</a></li><li><a href=https://www.geeksforgeeks.org/object-oriented-analysis-and-design/?ref=outindfooter>OOAD</a></li><li><a href=https://www.geeksforgeeks.org/system-design-interview-bootcamp-guide/?ref=outindfooter>System Design Bootcamp</a></li><li><a href=https://www.geeksforgeeks.org/most-commonly-asked-system-design-interview-problems-questions/?ref=outindfooter>Interview Questions</a></li></ul><ul class="footer-wrapper_links-list" ><li><a class="link-head" href=https://www.geeksforgeeks.org/technical-interview-preparation/?ref=outindfooter>Inteview Preparation</a></li><li><a href=https://www.geeksforgeeks.org/competitive-programming-a-complete-guide/?ref=outindfooter>Competitive Programming</a></li><li><a href=https://www.geeksforgeeks.org/top-algorithms-and-data-structures-for-competitive-programming/?ref=outindfooter>Top DS or Algo for CP</a></li><li><a href=https://www.geeksforgeeks.org/company-wise-recruitment-process/?ref=outindfooter>Company-Wise Recruitment Process</a></li><li><a href=https://www.geeksforgeeks.org/company-preparation/?ref=outindfooter>Company-Wise Preparation</a></li><li><a href=https://www.geeksforgeeks.org/aptitude-questions-and-answers/?ref=outindfooter>Aptitude Preparation</a></li><li><a href=https://www.geeksforgeeks.org/puzzles/?ref=outindfooter>Puzzles</a></li></ul><ul class="footer-wrapper_links-list" ><li>School Subjects</li><li><a href=https://www.geeksforgeeks.org/maths/?ref=outindfooter>Mathematics</a></li><li><a href=https://www.geeksforgeeks.org/physics/?ref=outindfooter>Physics</a></li><li><a href=https://www.geeksforgeeks.org/chemistry/?ref=outindfooter>Chemistry</a></li><li><a href=https://www.geeksforgeeks.org/biology/?ref=outindfooter>Biology</a></li><li><a href=https://www.geeksforgeeks.org/social-science/?ref=outindfooter>Social Science</a></li><li><a href=https://www.geeksforgeeks.org/english-grammar/?ref=outindfooter>English Grammar</a></li><li><a href=https://www.geeksforgeeks.org/commerce/?ref=outindfooter>Commerce</a></li><li><a href=https://www.geeksforgeeks.org/tag/world-general-knowledge/?ref=outindfooter>World GK</a></li></ul><ul class="footer-wrapper_links-list" ><li><a class="link-head" href=https://www.geeksforgeeks.org/videos/?ref=outindfooter>GeeksforGeeks Videos</a></li><li><a href=https://www.geeksforgeeks.org/videos/category/sde-sheet/?ref=outindfooter>DSA</a></li><li><a href=https://www.geeksforgeeks.org/videos/category/python/?ref=outindfooter>Python</a></li><li><a href=https://www.geeksforgeeks.org/videos/category/java-w6y5f4/?ref=outindfooter>Java</a></li><li><a href=https://www.geeksforgeeks.org/videos/category/c/?ref=outindfooter>C++</a></li><li><a href=https://www.geeksforgeeks.org/videos/category/web-development/?ref=outindfooter>Web Development</a></li><li><a href=https://www.geeksforgeeks.org/videos/category/data-science/?ref=outindfooter>Data Science</a></li><li><a href=https://www.geeksforgeeks.org/videos/category/cs-subjects/?ref=outindfooter>CS Subjects</a></li></ul></div> </div> </div> <!-- Jobs Fair 2024 related CSS changes --> <style> :root{ --home-jobs-section-jf-logo: url('https://media.geeksforgeeks.org/auth-dashboard-uploads/JobFair2024Logo.svg'); } body[data-dark-mode="true"] { --home-jobs-section-jf-logo: url('https://media.geeksforgeeks.org/auth-dashboard-uploads/JobFair2024LogoDark.svg'); } .hp_job_section_jf_logo, .job-a-thon-jf-sticky-header-logo{ background: var(--home-jobs-section-jf-logo); height: 50px; background-repeat: no-repeat; width: 105px; background-size: 100px; } @keyframes challenge { 0%{ transform: scale(1); } 50%{ transform: scale(1.03); } 100%{ transform: scale(1); } } .job-a-thon-jf-sticky-header-logo{ height: 45px; } </style> <!-- ---------------------------------- --> <div class="footer-strip" > <div class="copyright"> <a href="https://www.geeksforgeeks.org/" rel="noopener noreferrer" target="_blank">@GeeksforGeeks, Sanchhaya Education Private Limited</a><span>, <a href="https://www.geeksforgeeks.org/copyright-information/">All rights reserved</a></span> </div> <div class="social-links"> </div> </div> </footer> </div><!-- #page --> <script type='text/javascript' src='https://www.geeksforgeeks.org/wp-includes/js/wp-embed.min.js?ver=4.9.8'></script> <!-- Cookie Consent Div--> <div class="cookie-consent hide-consent"> <span class="cookie-text"> We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our <a href="https://www.geeksforgeeks.org/cookie-policy/" target="_blank"><u>Cookie Policy</u></a> & <a href="https://www.geeksforgeeks.org/privacy-policy/" target="_blank"><u>Privacy Policy</u></a> </span> <button class="consent-btn"> Got It ! </button> </div> <!-- Cookie Consent Div ends --> <!--Light Box Div starts--> <div class="lightbox-target"> <img id="lightbox-image" src="" alt="Lightbox"/> <span class="lightbox-close"></span> </div> <!--Light Box Div ends--> <!-- <link rel="stylesheet" href="https://use.typekit.net/mrg0hpc.css"/> --> <link href="https://fonts.googleapis.com/css2?family=Nunito:wght@400;700&family=Source+Sans+3:wght@400;600&display=swap" rel="stylesheet"> <script> if(post_slug.includes('premium-plans-payment/') || post_slug.includes('premium-plans/')){ $('.darkMode-wrap').remove(); $('.toggle-darkMode').remove(); } function setGoogleRecaptcha() { var captchaSiteKey = '6LdMFNUZAAAAAIuRtzg0piOT-qXCbDF-iQiUi9KY'; grecaptcha.ready(function() { grecaptcha.execute(captchaSiteKey).then(function(token) { document.getElementById('g-recaptcha-response-suggestion-form').value = token; suggestionCall(); }); }); } </script> <div class="improve-modal--overlay" style="display: none;"> <div class="improve-modal--improvement" status="locked"> <div class="improve-modal--improve-header"> <div class="improve-header-fst-child">Improvement</div> <div class="improve-header-sec-child"> <i class="gfg-icon improve-cross-icon"></i> </div> </div> <div class="locked-status--impove-modal"> <div class="improve-modal--improve-content error-message"></div> <div class="improve-modal--improve-bottom"> <button class="improve-bottom-btn" type="button">Suggest changes</button> </div> </div> <div class="unlocked-status--improve-modal-content"> <div class="suggest-change_wrapper"> <div class="suggest-change-content_wrapper"> <div class="suggest-change">Suggest Changes</div> <div class="suggest-changes-about">Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.</div> </div> <div class="suggest-change-icon_wrapper"> <img class="suggest-change-icon" src="https://media.geeksforgeeks.org/auth-dashboard-uploads/suggestChangeIcon.png" alt="geeksforgeeks-suggest-icon"/> </div> </div> <div class="create-improvement_wrapper"> <div class="create-improvement-content_wrapper"> <div class="create-improvement">Create Improvement</div> <div class="create-improvements-about">Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.</div> </div> <div class="create-improvement-icon_wrapper"> <img class="create-improvement-icon" src="https://media.geeksforgeeks.org/auth-dashboard-uploads/createImprovementIcon.png" alt="geeksforgeeks-improvement-icon"/> </div> </div> <div class="error-status"></div> </div> </div> <div class="improve-modal--suggestion" style="display: none;"> <!-- Header of improve-modal--improvement and improve-modal--suggestion have same CSS rule that's why I use same class name --> <div class="improve-modal--improve-header"> <div class="left-arrow-icon_suggest_wrapper"> <div class="left-arrow-icon_wrapper"> <i class="gfg-icon improve-left-arrow-icon"></i> </div> <div class="improve-header-fst-child">Suggest Changes</div> </div> <div class="improve-header-sec-child"> <i class="gfg-icon improve-cross-icon"></i> </div> </div> <div class="suggestion-modal-section"> <form> <label for="suggestion-section">min 4 words, max CharLimit:2000</label> <textarea id="suggestion-section-textarea" name="suggestion-section" placeholder="Write your suggestions here"></textarea> <input type="hidden" name="g-recaptcha-suggestion-response" id="g-recaptcha-response-suggestion-form"> </form> </div> <!-- Button of improve-modal--improvement and improve-modal--suggestion have same CSS rule that's why I use same class name --> <div class="improve-modal--improve-bottom suggestion-btn"> <p><span id="suggestion-modal-alert" style="display: none;"></span></p> <button class="suggest-bottom-btn" type="button"></button> </div> </div> <a href="#" style="visibility:hidden" class="create-improvement-redirection-to-write" target="_blank"></a> </div> <script> var lockedCasesHtml = `<span class="improve-modal--improve-content-modified"></span><span>You can suggest the changes for now and it will be under 'My Suggestions' Tab on Write.</span><br><br><span>You will be notified via email once the article is available for improvement. Thank you for your valuable feedback!</span>`; var badgesRequiredHtml = `<span>It seems that you do not meet the eligibility criteria to create improvements for this article, as only users who have earned specific badges are permitted to do so.</span><br><br><span>However, you can still create improvements through the <a href="https://write.geeksforgeeks.org/pick-improvements/pick" target='_blank'>Pick for Improvement</a> section.</span>`; jQuery('.improve-header-sec-child').on('click', function(){ jQuery('.improve-modal--overlay').hide(); $('.improve-modal--suggestion').hide(); }); $('.suggest-change_wrapper, .locked-status--impove-modal .improve-bottom-btn').on('click',function(){ // when suggest changes option is clicked $('#suggestion-section-textarea').val(""); $('.suggest-bottom-btn').html("Suggest changes"); $('.improve-modal--improvement').hide(); $('.improve-modal--suggestion').show(); }); $('.create-improvement_wrapper').on('click',function(){ // when create improvement option clicked then improvement reason will be shown if(loginData && loginData.isLoggedIn) { $('body').append('<div class="spinner-loading-overlay"></div>'); $('.spinner-loading-overlay').show(); jQuery.ajax({ url: writeApiUrl + 'create-improvement-post/?v=1', type: "POST", contentType: 'application/json; charset=utf-8', dataType: 'json', xhrFields: { withCredentials: true }, data: JSON.stringify({ gfg_id: post_id }), success:function(result) { $('.spinner-loading-overlay:eq(0)').remove(); $('.improve-modal--overlay').hide(); $('.unlocked-status--improve-modal-content').css("display","none"); $('.create-improvement-redirection-to-write').attr('href',writeUrl + 'improve-post/' + `${result.id}` + '/', '_blank'); $('.create-improvement-redirection-to-write')[0].click(); }, error:function(e) { showErrorMessage(e.responseJSON,e.status) }, }); } else { if(loginData && !loginData.isLoggedIn) { $('.improve-modal--overlay').hide(); if ($('.header-main__wrapper').find('.header-main__signup.login-modal-btn').length) { $('.header-main__wrapper').find('.header-main__signup.login-modal-btn').click(); } return; } } }); $('.left-arrow-icon_wrapper').on('click',function(){ if($('.improve-modal--suggestion').is(":visible")) $('.improve-modal--suggestion').hide(); else{ } $('.improve-modal--improvement').show(); }); const showErrorMessage = (result,statusCode) => { if(!result) return; $('.spinner-loading-overlay:eq(0)').remove(); if(statusCode == 403) { $('.improve-modal--improve-content.error-message').html(result.message); jQuery('.improve-modal--overlay').show(); jQuery('.improve-modal--improvement').show(); $('.locked-status--impove-modal').css("display","block"); $('.unlocked-status--improve-modal-content').css("display","none"); $('.improve-modal--improvement').attr("status","locked"); return; } } function loadScript(src, callback) { var script = document.createElement('script'); script.src = src; script.onload = callback; document.head.appendChild(script); } function suggestionCall() { var suggest_val = $.trim($("#suggestion-section-textarea").val()); var array_String= suggest_val.split(" ") var gCaptchaToken = $("#g-recaptcha-response-suggestion-form").val(); var error_msg = false; if(suggest_val != "" && array_String.length >=4){ if(suggest_val.length <= 2000){ var payload = { "gfg_post_id" : `${post_id}`, "suggestion" : `<p>${suggest_val}</p>`, } if(!loginData || !loginData.isLoggedIn) // User is not logged in payload["g-recaptcha-token"] = gCaptchaToken jQuery.ajax({ type:'post', url: "https://apiwrite.geeksforgeeks.org/suggestions/auth/create/", xhrFields: { withCredentials: true }, crossDomain: true, contentType:'application/json', data: JSON.stringify(payload), success:function(data) { jQuery('.spinner-loading-overlay:eq(0)').remove(); jQuery('#suggestion-section-textarea').val(""); jQuery('.suggest-bottom-btn').css("display","none"); // Update the modal content const modalSection = document.querySelector('.suggestion-modal-section'); modalSection.innerHTML = ` <div class="thank-you-message" style="text-align: center;"> <h2>Thank You!</h2> <div class="thank-you-message-content">Your suggestions are valuable to us.</div> </div> `; }, error:function(data) { jQuery('.spinner-loading-overlay:eq(0)').remove(); jQuery('#suggestion-modal-alert').html("Something went wrong."); jQuery('#suggestion-modal-alert').show(); error_msg = true; } }); } else{ jQuery('.spinner-loading-overlay:eq(0)').remove(); jQuery('#suggestion-modal-alert').html("Minimum 5 Words and Maximum Character limit is 2000."); jQuery('#suggestion-modal-alert').show(); jQuery('#suggestion-section-textarea').focus(); error_msg = true; } } else{ jQuery('.spinner-loading-overlay:eq(0)').remove(); jQuery('#suggestion-modal-alert').html("Enter atleast four words !"); jQuery('#suggestion-modal-alert').show(); jQuery('#suggestion-section-textarea').focus(); error_msg = true; } if(error_msg){ setTimeout(() => { jQuery('#suggestion-section-textarea').focus(); jQuery('#suggestion-modal-alert').hide(); }, 3000); } } document.querySelector('.suggest-bottom-btn').addEventListener('click', function(){ jQuery('body').append('<div class="spinner-loading-overlay"></div>'); jQuery('.spinner-loading-overlay').show(); if(loginData && loginData.isLoggedIn) { suggestionCall(); return; } // load the captcha script and set the token loadScript('https://www.google.com/recaptcha/api.js?render=6LdMFNUZAAAAAIuRtzg0piOT-qXCbDF-iQiUi9KY',[], function() { setGoogleRecaptcha(); }); }); $('.improvement-bottom-btn.create-improvement-btn').click(function() { //create improvement button is clicked $('body').append('<div class="spinner-loading-overlay"></div>'); $('.spinner-loading-overlay').show(); // send this option via create-improvement-post api jQuery.ajax({ url: writeApiUrl + 'create-improvement-post/?v=1', type: "POST", contentType: 'application/json; charset=utf-8', dataType: 'json', xhrFields: { withCredentials: true }, data: JSON.stringify({ gfg_id: post_id }), success:function(result) { $('.spinner-loading-overlay:eq(0)').remove(); $('.improve-modal--overlay').hide(); $('.create-improvement-redirection-to-write').attr('href',writeUrl + 'improve-post/' + `${result.id}` + '/', '_blank'); $('.create-improvement-redirection-to-write')[0].click(); }, error:function(e) { showErrorMessage(e.responseJSON,e.status); }, }); }); </script> <script> var AdblockPlus = new function() { this.detect = function(px, callback) { var detected = false; var checksRemain = 2; var error1 = false; var error2 = false; if (typeof callback != "function") return; px += "?ch=*&rn=*"; function beforeCheck(callback, timeout) { if (checksRemain == 0 || timeout > 1E3) callback(checksRemain == 0 && detected); else setTimeout(function() { beforeCheck(callback, timeout * 2) }, timeout * 2) } function checkImages() { if (--checksRemain) return; detected = !error1 && error2 } var random = Math.random() * 11; var img1 = new Image; img1.onload = checkImages; img1.onerror = function() { error1 = true; checkImages() }; img1.src = px.replace(/\*/, 1).replace(/\*/, random); var img2 = new Image; img2.onload = checkImages; img2.onerror = function() { error2 = true; checkImages() }; img2.src = px.replace(/\*/, 2).replace(/\*/, random); beforeCheck(callback, 250) } }; /* AdblockPlus.detect("https://cdnads.geeksforgeeks.org/res/px.gif", function(abp){ window.googletag = window.googletag || {cmd: []}; window.abp=abp; var elms = [...document.querySelectorAll('div[id^=_GFG_ABP_]')]; const units=elms.map(elem=>elem.id) if(abp) { for(let curr_unit of units) { const iframe = document.createElement('iframe'); iframe.setAttribute('src',"https://aa.geeksforgeeks.org/iframe.html?code="+curr_unit.substr(1)) const elem = document.getElementById(curr_unit) const div = document.createElement('div'); div.setAttribute('id',curr_unit.substr(1)) let sizes = curr_unit.split("_"); sizes = sizes.filter(val => val.includes('x')); let [width, height] = sizes[0].split("x"); iframe.style.width = `${+width+20}px` iframe.style.height = `${+height+20}px` if(elem) { elem.appendChild(iframe); } } var gfgAdDivs = [...document.querySelectorAll('div[id^=GFG_AD_]')]; gfgAdDivs.forEach(gfgDiv => document.getElementById(gfgDiv.id).removeAttribute("style")); jQuery('#secondary .widget_text:last-child').css({"position": "unset"}); } });*/ AdblockPlus.detect("https://cdnads.geeksforgeeks.org/res/px.gif", function(abp){ window.googletag = window.googletag || {cmd: []}; window.abp=abp; var elms = [...document.querySelectorAll('div[id^=_GFG_ABP_]')]; //const units=elms.map(elem=>elem.id) const units = elms .filter(elem => !(window.innerWidth < 1500 && elem.id === "_GFG_ABP_Incontent_728x90")) .map(elem => elem.id); if(abp) { isAdBlockerPresent = true; for(let curr_unit of units) { const iframe = document.createElement('iframe'); iframe.addEventListener("load", () => { iframe.contentWindow.postMessage(JSON.stringify({host: window.location.host,category: window.arrPostCatName,parentWidth: window.innerWidth}),'https://aa.geeksforgeeks.org'); }); iframe.setAttribute('src',"https://aa.geeksforgeeks.org/iframe.html?code="+curr_unit.substr(1)) const elem = document.getElementById(curr_unit) const div = document.createElement('div'); div.setAttribute('id',curr_unit.substr(1)) let sizes = curr_unit.split("_"); sizes = sizes.filter(val => val.includes('x')); let [width, height] = sizes[0].split("x"); iframe.style.width = `${+width+20}px` iframe.style.height = `${+height+20}px` if(elem) { elem.appendChild(iframe); } } var gfgAdDivs = [...document.querySelectorAll('div[id^=GFG_AD_]')]; gfgAdDivs.forEach(gfgDiv => document.getElementById(gfgDiv.id).removeAttribute("style")); jQuery('#secondary .widget_text:last-child').css({"position": "unset"}); } else{ try { var isAdblockEnabled = t => fetch( new Request('https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js', { method: 'HEAD', mode: 'no-cors' }) ).catch(t); isAdblockEnabled(() => { // here goes modal pop-up code isAdBlockerPresent = true; }); } catch (err) {console.log(err);} } }); function closeAdBlockPopupModal(){ const modal = document.getElementById("adBlockerModal"); $('body').removeClass('body-for-ad-blocker'); $('#adBlockerModal').remove() localStorage.setItem('gfgAdBlockPopup',new Date()) } function showAdblockerModal(){ let randomNumberForButtonText = Math.round(Math.random()); let currTime = new Date(); let lastTime = new Date(localStorage.getItem('gfgAdBlockPopup')); if(((currTime-lastTime)/(1000*60*60))<1) { return; } const adBlockerModal = `<div id="adBlockerModal" class="ad-blocker-modal"> <div id="ad-blocker-modal-overlay"> <div id="ad-blocker-outer-div"> <div id="ad-blocker-div"> <p id="ad-blocker-div-warning" style="margin-bottom: 30px;">It seems that you are using an ad blocker.<br><span style="font-size: 22px;font-weight: normal;">Please disable it to support us!</span></p> <div id="ad-blocker-div-btns"> <button id="ad-blocker-div-button1" onclick="handleAdBlockerClick('disabled')"> I disabled my ad blocker </button> <a href="https://www.geeksforgeeks.org/geeksforgeeks-premium-subscription${randomNumberForButtonText === 1 ? "/?itm_source=geeksforgeeks&itm_medium=adblocker&itm_campaign=premium1" : "/?itm_source=geeksforgeeks&itm_medium=adblocker&itm_campaign=premium2"}" target="_blank"> <button id="ad-blocker-div-button2" style=" background: linear-gradient(45deg, #f0bd36, #bf873f); border: 1px solid transparent; color: white; " > ${randomNumberForButtonText === 1 ? "Go Ad-Free with Premium" : "Upgrade for No Ads"} </button> </a> </div> <div id="ad-blocker-div-continue-premium-promo-text"> "For an ad-free experience and exclusive features, subscribe to our Premium Plan!"<br> </div> <div id="ad-blocker-div-continue-btn-div"> <a id="ad-blocker-div-continue-btn" href="#" onclick="closeAdBlockPopupModal()">Continue without supporting</a> </div> </div> </div> </div> </div>`; $('body').append(adBlockerModal); $('body').addClass('body-for-ad-blocker'); const modal = document.getElementById("adBlockerModal"); modal.style.display = "block"; } function handleAdBlockerClick(type){ if(type == 'disabled'){ window.location.reload(); } else if(type == 'info'){ document.getElementById("ad-blocker-div").style.display = "none"; document.getElementById("ad-blocker-info-div").style.display = "flex"; handleAdBlockerIconClick(0); } } var lastSelected= null; //Mapping of name and video URL with the index. const adBlockerVideoMap = [ ['Ad Block Plus','https://media.geeksforgeeks.org/auth-dashboard-uploads/abp-blocker-min.mp4'], ['Ad Block','https://media.geeksforgeeks.org/auth-dashboard-uploads/Ad-block-min.mp4'], ['uBlock Origin','https://media.geeksforgeeks.org/auth-dashboard-uploads/ub-blocke-min.mp4'], ['uBlock','https://media.geeksforgeeks.org/auth-dashboard-uploads/U-blocker-min.mp4'], ] function handleAdBlockerIconClick(currSelected){ const videocontainer = document.getElementById('ad-blocker-info-div-gif'); const videosource = document.getElementById('ad-blocker-info-div-gif-src'); if(lastSelected != null){ document.getElementById("ad-blocker-info-div-icons-"+lastSelected).style.backgroundColor = "white"; document.getElementById("ad-blocker-info-div-icons-"+lastSelected).style.borderColor = "#D6D6D6"; } document.getElementById("ad-blocker-info-div-icons-"+currSelected).style.backgroundColor = "#D9D9D9"; document.getElementById("ad-blocker-info-div-icons-"+currSelected).style.borderColor = "#848484"; document.getElementById('ad-blocker-info-div-name-span').innerHTML = adBlockerVideoMap[currSelected][0] videocontainer.pause(); videosource.setAttribute('src', adBlockerVideoMap[currSelected][1]); videocontainer.load(); videocontainer.play(); lastSelected = currSelected; } </script> <!-- <script async src="https://www.googleoptimize.com/optimize.js?id=OPT-5PGZ8MN"></script> --> <style> /* Temporary CSS for Three90 pop up modal (START)*/ .three90popup__container { width: 100vw; height: 100vh; position: fixed; top:0px; background: var(--job-tab-faded-background); z-index: 1024; display: flex; align-items: center; justify-content: center; } .three90modal__wrapper{ background-color: white; max-width: 350px; display: flex; flex-direction: column; border-radius: 10px; overflow: hidden; } .three90modal__message-container { display: flex; flex-direction: column; align-items: center; font-family: var(--font-primary); } .three90modal__subheading { margin-top: 20px; font-size: 22px; font-weight: 600; } .three90modal__text-message { margin-top: 20px; font-size: 15px; font-weight: 400; text-align: center; padding: 0 5px; } .three90__modal__button-wrapper { width: 100%; padding: 20px 0px; display: flex; justify-content: space-evenly; } .three90__modal__button-wrapper > button { width: 105px; height: 35px; border-radius: 13px; border:none; font-weight: 600; cursor: pointer; } #three90__modal-close-btn:hover { background-color: #cacbcd; } #three90__modal-explore-btn { background-color: #0a0727; color: white } @media screen and (max-width: 441px) { .three90modal__wrapper { max-width: 300px; } } /* Temporary CSS for Three90 pop up modal (END)*/ </style> <script type="text/javascript" > const coursePromotionCities = JSON.parse(`{"NCR":{"LOCATIONS":["Noida","Greater Noida","Ghaziabad","Faridabad","Delhi","New Delhi"],"COURSES":[{"name":"GATE CS 2025 Classroom Program","url":"https:\/\/www.geeksforgeeks.org\/courses\/gate-cs-self-paced"},{"name":"MERN Full Stack Development","url":"https:\/\/www.geeksforgeeks.org\/courses\/mern-full-stack-development-classroom"},{"name":"DSA For Interview Preparation","url":" https:\/\/www.geeksforgeeks.org\/courses\/dsa-interview-preparation-classroom"},{"name":"JAVA Backend Development","url":"https:\/\/www.geeksforgeeks.org\/courses\/complete-java-backend-development-program"},{"name":"Data Analytics Programme","url":"https:\/\/www.geeksforgeeks.org\/courses\/complete-data-analytics-program"},{"name":"AWS Solutions Architect Certification","url":"https:\/\/www.geeksforgeeks.org\/courses\/aws-solutions-architect-certification-classroom-training"},{"name":"Explore All","url":"https:\/\/www.geeksforgeeks.org\/courses\/offline-courses"}]},"NON_NCR":{"Bengaluru":[{"name":"Data Science Classroom Program","url":"https:\/\/www.geeksforgeeks.org\/courses\/data-science-classroom-program"},{"name":"System Design Classroom Program","url":"https:\/\/www.geeksforgeeks.org\/courses\/system-design-classroom-program"},{"name":"MERN Full Stack Development","url":"https:\/\/www.geeksforgeeks.org\/courses\/mern-full-stack-development-classroom"},{"name":"DSA For Interview Preparation","url":"https:\/\/www.geeksforgeeks.org\/courses\/dsa-interview-preparation-classroom"},{"name":"JAVA Backend Development","url":"https:\/\/www.geeksforgeeks.org\/courses\/complete-java-backend-development-program"},{"name":"Data Analytics Programme","url":"https:\/\/www.geeksforgeeks.org\/courses\/complete-data-analytics-program"},{"name":"AWS Solutions Architect Certification","url":"https:\/\/www.geeksforgeeks.org\/courses\/aws-solutions-architect-certification-classroom-training"},{"name":"Explore All","url":"https:\/\/www.geeksforgeeks.org\/courses\/offline-courses"}],"Pune":[{"name":"MERN Full Stack Development","url":"https:\/\/www.geeksforgeeks.org\/courses\/mern-full-stack-development-classroom"},{"name":"DSA For Interview Preparation","url":"https:\/\/www.geeksforgeeks.org\/courses\/dsa-interview-preparation-classroom"},{"name":"Complete Data Analytics Program","url":"https:\/\/www.geeksforgeeks.org\/courses\/complete-data-analytics-program"},{"name":"Explore All","url":"https:\/\/www.geeksforgeeks.org\/courses\/offline-courses"}],"Hyderabad":[{"name":"Complete Data Analytics Program","url":"https:\/\/www.geeksforgeeks.org\/courses\/complete-data-analytics-program"},{"name":"Complete Backend Development Program","url":"https:\/\/www.geeksforgeeks.org\/courses\/complete-java-backend-development-program"},{"name":"DSA for Interview Preparation","url":"https:\/\/www.geeksforgeeks.org\/courses\/dsa-interview-preparation-classroom"},{"name":"MERN Full Stack Web Development","url":"https:\/\/www.geeksforgeeks.org\/courses\/mern-full-stack-development-classroom"}]}}`); const offlineCourseTermMapper = JSON.parse(`{"ALL_TERMIDS":["2058","6263","2628","1745","1789","2601","2057","5037","2971","2023","2162","2795"],"COURSE_TERMID_MAP":{"JAVA":["2058"],"DATA_ANALYTICS":["1745","1789","2601","2057","5037","2971","2023","2162","2795"],"DSA":["6263"],"MERN":["2628"]}}`); </script> <script async src="https://www.geeksforgeeks.org/wp-content/themes/iconic-one/js/event-promotion.min.js?ver=4.5"></script> <!-- gfg tabs compatablity bundled js --> <!-- Google Tag Manager --> <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-KDVRCT5');</script> <!-- Global site tag (gtag.js) - Google Analytics --> <script async src="https://www.googletagmanager.com/gtag/js?id=G-DWCCJLKX3X"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); // gtag('config', 'AW-474915276'); gtag('config', 'G-DWCCJLKX3X'); gtag('config', 'AW-796001856'); </script> <!-- fancybar ad code start --> <div id="GFG_AD_Desktop_Stickyunit_1x1"></div> <!-- fancybar ad code ends --> <!-- <div id="GFG_AD_gfg_mobile_320x50"></div> --> <style> :root { --com-extra-icons-mobile-image: url(https://media.geeksforgeeks.org/auth-dashboard-uploads/Com-Extra-Icons13.svg); --write-experience-card-1: #ECF5F5; --write-experience-card-icon-1: #21898C; --write-experience-card-2: #EAF2F7; --write-experience-card-icon-2: #3079AC; --write-experience-card-3: #FDEFE6; --write-experience-card-icon-3: #F5A572; --write-experience-card-4: #F1F8F5; --write-experience-card-icon-4: #91C4AD; --write-experience-card-5: #EEE7FF; --write-experience-card-icon-5: #8B72C9; --write-experience-card-6: #F2F8E6; --write-experience-card-icon-6: #78C57F; --editor-button-text-color: #6E6E73; --write-modal-background: #fefefe; --experience-sidebar: #000; --left-bar-background: #FFFFFF; --write-redirect-container:#EAF2F7; --write-redirect-container-hover:#d6e7f2; } /* Dark Mode */ body[data-dark-mode="true"] { --write-modal-background: #161c23; --experience-sidebar: #000; --left-bar-background: #F0F3F5; } .popup-main { padding: 20px 18px 20px 18px; border-radius: 8px; } .popup-main .popup-heading { display: flex; align-items: center; color: #E9E9EA; margin-bottom: 10px; justify-content: space-between; } .popup-main .close-icon { background-image: var(--com-extra-icons-mobile-image);background-position: -15px -1651px;height: 22px;width: 22px;transform: scale(1); margin-bottom: 12px; cursor: pointer; } .popup-main .experience-card { color: #000; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; /* margin-bottom:10px; */ } .popup-main a:hover, .popup-main a:active, .popup-main a:visited { color: inherit; text-decoration: none; } .popup-main .exp-card1, .popup-main .exp-card2, .popup-main .exp-card3, .popup-main .exp-card4, .popup-main .exp-card5, .popup-main .exp-card6 { display: flex; align-items: center; border-radius: 10px; cursor: pointer; } .popup-main .exp-card1 .icon1, .popup-main .exp-card2 .icon2, .popup-main .exp-card3 .icon3, .popup-main .exp-card4 .icon4, .popup-main .exp-card5 .icon5, .popup-main .exp-card6 .icon6 { width: 80px; height: 80px; border-radius: 10px 0px 0px 10px; display: flex; align-items: center; justify-content: center; background: var(--write-experience-card-icon-1); } .popup-main .exp-card1 .icon1, .popup-main .exp-card2 .icon2, .popup-main .exp-card3 .icon3, .popup-main .exp-card4 .icon4, .popup-main .exp-card5 .icon5, .popup-main .exp-card6 .icon6 { width: 80px; height: 80px; border-radius: 10px 0px 0px 10px; display: flex; align-items: center; justify-content: center; } .popup-main .exp-card1 .icon1 { background: var(--write-experience-card-icon-1); } .popup-main .exp-card2 .icon2 { background: var(--write-experience-card-icon-2); } .popup-main .exp-card3 .icon3 { background: var(--write-experience-card-icon-3); } .popup-main .exp-card4 .icon4 { background: var(--write-experience-card-icon-4); } .popup-main .exp-card5 .icon5 { background: var(--write-experience-card-icon-5); } .popup-main .exp-card6 .icon6 { background: var(--write-experience-card-icon-6); } .popup-main .exp-card6 .icon6-image { background-image: url(https://media.geeksforgeeks.org/auth-dashboard-uploads/compass.svg); width: 46px; height: 30px; background-size: 30px; background-repeat: no-repeat; background-position: center; } .popup-main .exp-card1 .icon1-image { background-image: var(--com-extra-icons-mobile-image); width: 46px; height: 28px; background-position: -4px -812px; } .popup-main .exp-card2 .icon2-image { background-image: var(--com-extra-icons-mobile-image); width: 46px; height: 28px; background-position: -4px -888px; } .popup-main .exp-card3 .icon3-image { background-image: var(--com-extra-icons-mobile-image); width: 46px; height: 28px; background-position: -4px -848px; } .popup-main .exp-card4 .icon4-image { background-image: url(https://media.geeksforgeeks.org/auth-dashboard-uploads/competitive.svg); width: 46px; height: 30px; background-size: 30px; background-repeat: no-repeat; background-position: center; } .popup-main .exp-card5 .icon5-image { background-image: var(--com-extra-icons-mobile-image); width: 46px; height: 33px; background-position: -4px -1217px; } .popup-main .exp-card1 .exp-card1-text, .popup-main .exp-card2 .exp-card2-text, .popup-main .exp-card3 .exp-card3-text, .popup-main .exp-card4 .exp-card4-text, .popup-main .exp-card5 .exp-card5-text, .popup-main .exp-card6 .exp-card6-text { display: flex; align-items: center; border-radius: 0px 10px 10px 0px; height: 80px; width: calc(100% - 80px); } .popup-main .exp-card1 { justify-content: flex-start; background: var(--write-experience-card-1); } .popup-main .exp-card2 { justify-content: flex-start; background: var(--write-experience-card-2); } .popup-main .exp-card3 { justify-content: flex-start; background: var(--write-experience-card-3); } .popup-main .exp-card4 { justify-content: flex-start; background: var(--write-experience-card-4); } .popup-main .exp-card5 { justify-content: flex-start; background: var(--write-experience-card-5); } .popup-main .exp-card6 { justify-content: flex-start; background: var(--write-experience-card-6); } .popup-main span { font-family: var(--font-primary); font-size: 14px; font-style: normal; font-weight: 500; line-height: normal; padding-left: 5px; padding-right: 5px; } #popup { display: none; background-color: var(--write-modal-background); padding: 20px; text-align: center; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 1026; width: min(650px, calc(100% - 20px)); } .link-container-write{ display:flex; flex-direction:column; } .link-container-write > a { margin:7px 0px; } .phrase__container{ color:var(--color-gfg); border-radius: 6px; width: 100%; background-color:var(--write-redirect-container); padding: 15px; text-align: justify; font-size:14px; } .phrase__container:hover { color:var(--color-gfg) !important; background-color:var(--write-redirect-container-hover); } </style> <div class="popup-container"> <div id="popup" accesskey="" class="popup-main"> <div class="popup-heading"> <h2>What kind of Experience do you want to share?</h2> <div class="close-icon share-experience-modal-close"></div> </div> <!-- <span class="description"style="color: #BEBEC2;">Tell us your type of experiences which can help other fellow Geeks for their future events and preparations.</span> --> <div class="experience-card"> <a class="exp-card5" href= "https://write.geeksforgeeks.org/posts-new?cid=e8fc46fe-75e7-4a4b-be3c-0c862d655ed0" target="_blank"> <div class="icon5"> <div class="icon5-image"></div> </div> <div class="exp-card5-text"> <span style="color: #000;">Interview Experiences</span> </div> </a> <a class="exp-card1" href="https://write.geeksforgeeks.org/posts-new?cid=82536bdb-84e6-4661-87c3-e77c3ac04ede" target="_blank"> <div class="icon1"> <div class="icon1-image"></div> </div> <div class="exp-card1-text"> <span style="color: #000;">Admission Experiences</span> </div> </a> <a class="exp-card6" href= "https://write.geeksforgeeks.org/posts-new?cid=5219b0b2-7671-40a0-9bda-503e28a61c31" target="_blank"> <div class="icon6"> <div class="icon6-image"></div> </div> <div class="exp-card6-text"> <span style="color: #000;">Career Journeys</span> </div> </a> <a class="exp-card2" href="https://write.geeksforgeeks.org/posts-new?cid=22ae3354-15b6-4dd4-a5b4-5c7a105b8a8f" target="_blank"> <div class="icon2"> <div class="icon2-image"></div> </div> <div class="exp-card2-text"> <span style="color: #000;">Work Experiences</span> </div> </a> <a class="exp-card3" href= "https://write.geeksforgeeks.org/posts-new?cid=c5e1ac90-9490-440a-a5fa-6180c87ab8ae" target="_blank"> <div class="icon3"> <div class="icon3-image"></div> </div> <div class="exp-card3-text"> <span style="color: #000;">Campus Experiences</span> </div> </a> <a class="exp-card4" href= "https://write.geeksforgeeks.org/posts-new?cid=5ebb8fe9-b980-4891-af07-f2d62a9735f2" target="_blank"> <div class="icon4"> <div class="icon4-image"></div> </div> <div class="exp-card4-text"> <span style="color: #000;">Competitive Exam Experiences</span> </div> </a> </div> <!-- <div class="link-container-write"> <a href="https://write.geeksforgeeks.org/pick-article?taxonomy=10261&page=1"> <div role="span" class="phrase__container"> Can't choose a topic to write? click here for suggested topics </div> </a> <a href="https://write.geeksforgeeks.org/posts-new"> <div role="span" class="phrase__container"> Write and publish your own Article </div> </a> </div> --> </div> <div id="overlay" onclick="toggleExperiencePopup()" style="display: block;min-height: 100vh;min-width: 100vw;position: fixed;top: 0;bottom: 0;right: 0;left: 0;display: none;justify-content: center;align-items: center;background: rgba(0,0,0,.702);z-index: 1025 !important;backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);word-break: keep-all;"></div> </div> <script> $('.share-experience-modal').click(function(e){ e.preventDefault(); var link = $(this).attr('href'); toggleExperiencePopup(link); }); function toggleExperiencePopup(link) { var popup = document.getElementById("popup"); var overlay = document.getElementById("overlay"); if (window.innerWidth < 992) { window.location.href = link; } else { popup.style.display = (popup.style.display === "block") ? "none" : "block"; overlay.style.display = (overlay.style.display === "block") ? "none" : "block"; } } $('.share-experience-modal-close').click(function(e){ var popup = document.getElementById("popup"); popup.style.display = 'none'; var overlay = document.getElementById("overlay"); overlay.style.display = 'none'; }); </script> </div><!-- Chat bot is being shown for these category articles (8 -> linked-list 9172 -> AI-ML-DS, 1789 -> python 4667 -> math) --> </body> </html> <!-- Dynamic page generated in 0.530 seconds. --> <!-- Cached page generated by WP-Super-Cache on 2025-02-25 18:14:11 --> <!-- Compression = gzip --> <!-- super cache -->