{"id":3318,"date":"2017-10-10T13:40:16","date_gmt":"2017-10-10T17:40:16","guid":{"rendered":"https:\/\/www.freelancinggig.com\/blog\/?post_type=glossary&#038;p=3318"},"modified":"2017-10-10T13:40:16","modified_gmt":"2017-10-10T17:40:16","slug":"breadth-first-search","status":"publish","type":"glossary","link":"https:\/\/www.freelancinggig.com\/blog\/glossary\/breadth-first-search\/","title":{"rendered":"Breadth-First Search"},"content":{"rendered":"<p>It starts from the root node, explores the neighboring nodes first and moves towards the next level neighbors. It generates one tree at a time until the solution is found. It can be implemented using FIFO queue data structure. This method provides shortest path to the solution.<\/p>\n<p>If <strong>branching factor<\/strong> (average number of child nodes for a given node) = b and depth = d, then number of nodes at level d = bd.<\/p>\n<p>The total no of nodes created in worst <a class=\"glossaryLink\"  href=\"https:\/\/www.freelancinggig.com\/blog\/glossary\/case\/\"  data-gt-translate-attributes='[{\"attribute\":\"data-cmtooltip\", \"format\":\"html\"}]'  tabindex='0' role='link'>case<\/a> is b + b2 + b3 + &hellip; + bd.<\/p>\n<p><strong>Disadvantage:<\/strong> Since each level of nodes is saved for creating next one, it consumes a lot of memory space. Space requirement to store nodes is exponential.<\/p>\n<p>Its complexity depends on the number of nodes. It can check duplicate nodes.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It starts from the root node, explores the neighboring nodes first and moves towards the next level neighbors. It generates one tree at a time &#x2026;<\/p>\n","protected":false},"author":2,"featured_media":0,"menu_order":0,"template":"","meta":{"footnotes":""},"class_list":["post-3318","glossary","type-glossary","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Breadth-First Search - Developers, Designers &amp; Freelancers - FreelancingGig<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.freelancinggig.com\/blog\/glossary\/breadth-first-search\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Breadth-First Search - Developers, Designers &amp; Freelancers - FreelancingGig\" \/>\n<meta property=\"og:description\" content=\"It starts from the root node, explores the neighboring nodes first and moves towards the next level neighbors. It generates one tree at a time ...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.freelancinggig.com\/blog\/glossary\/breadth-first-search\/\" \/>\n<meta property=\"og:site_name\" content=\"Developers, Designers &amp; Freelancers - FreelancingGig\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.freelancinggig.com\\\/blog\\\/glossary\\\/breadth-first-search\\\/\",\"url\":\"https:\\\/\\\/www.freelancinggig.com\\\/blog\\\/glossary\\\/breadth-first-search\\\/\",\"name\":\"Breadth-First Search - Developers, Designers &amp; Freelancers - FreelancingGig\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.freelancinggig.com\\\/blog\\\/#website\"},\"datePublished\":\"2017-10-10T17:40:16+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.freelancinggig.com\\\/blog\\\/glossary\\\/breadth-first-search\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.freelancinggig.com\\\/blog\\\/glossary\\\/breadth-first-search\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.freelancinggig.com\\\/blog\\\/glossary\\\/breadth-first-search\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.freelancinggig.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Breadth-First Search\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.freelancinggig.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.freelancinggig.com\\\/blog\\\/\",\"name\":\"Developers, Designers &amp; Freelancers - FreelancingGig\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.freelancinggig.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.freelancinggig.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.freelancinggig.com\\\/blog\\\/#organization\",\"name\":\"FreelancingGig\",\"url\":\"https:\\\/\\\/www.freelancinggig.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.freelancinggig.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.freelancinggig.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/03\\\/freelancinggig-website-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.freelancinggig.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/03\\\/freelancinggig-website-logo.png\",\"width\":213,\"height\":35,\"caption\":\"FreelancingGig\"},\"image\":{\"@id\":\"https:\\\/\\\/www.freelancinggig.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Breadth-First Search - Developers, Designers &amp; Freelancers - FreelancingGig","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.freelancinggig.com\/blog\/glossary\/breadth-first-search\/","og_locale":"en_US","og_type":"article","og_title":"Breadth-First Search - Developers, Designers &amp; Freelancers - FreelancingGig","og_description":"It starts from the root node, explores the neighboring nodes first and moves towards the next level neighbors. It generates one tree at a time ...","og_url":"https:\/\/www.freelancinggig.com\/blog\/glossary\/breadth-first-search\/","og_site_name":"Developers, Designers &amp; Freelancers - FreelancingGig","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.freelancinggig.com\/blog\/glossary\/breadth-first-search\/","url":"https:\/\/www.freelancinggig.com\/blog\/glossary\/breadth-first-search\/","name":"Breadth-First Search - Developers, Designers &amp; Freelancers - FreelancingGig","isPartOf":{"@id":"https:\/\/www.freelancinggig.com\/blog\/#website"},"datePublished":"2017-10-10T17:40:16+00:00","breadcrumb":{"@id":"https:\/\/www.freelancinggig.com\/blog\/glossary\/breadth-first-search\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.freelancinggig.com\/blog\/glossary\/breadth-first-search\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.freelancinggig.com\/blog\/glossary\/breadth-first-search\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.freelancinggig.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Breadth-First Search"}]},{"@type":"WebSite","@id":"https:\/\/www.freelancinggig.com\/blog\/#website","url":"https:\/\/www.freelancinggig.com\/blog\/","name":"Developers, Designers &amp; Freelancers - FreelancingGig","description":"","publisher":{"@id":"https:\/\/www.freelancinggig.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.freelancinggig.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.freelancinggig.com\/blog\/#organization","name":"FreelancingGig","url":"https:\/\/www.freelancinggig.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.freelancinggig.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.freelancinggig.com\/blog\/wp-content\/uploads\/2020\/03\/freelancinggig-website-logo.png","contentUrl":"https:\/\/www.freelancinggig.com\/blog\/wp-content\/uploads\/2020\/03\/freelancinggig-website-logo.png","width":213,"height":35,"caption":"FreelancingGig"},"image":{"@id":"https:\/\/www.freelancinggig.com\/blog\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.freelancinggig.com\/blog\/wp-json\/wp\/v2\/glossary\/3318","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.freelancinggig.com\/blog\/wp-json\/wp\/v2\/glossary"}],"about":[{"href":"https:\/\/www.freelancinggig.com\/blog\/wp-json\/wp\/v2\/types\/glossary"}],"author":[{"embeddable":true,"href":"https:\/\/www.freelancinggig.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"version-history":[{"count":1,"href":"https:\/\/www.freelancinggig.com\/blog\/wp-json\/wp\/v2\/glossary\/3318\/revisions"}],"predecessor-version":[{"id":3319,"href":"https:\/\/www.freelancinggig.com\/blog\/wp-json\/wp\/v2\/glossary\/3318\/revisions\/3319"}],"wp:attachment":[{"href":"https:\/\/www.freelancinggig.com\/blog\/wp-json\/wp\/v2\/media?parent=3318"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}