{"id":40237,"date":"2020-10-06T19:38:42","date_gmt":"2020-10-06T19:38:42","guid":{"rendered":"https:\/\/www.oracletutoring.ca\/blog\/?p=40237"},"modified":"2020-10-06T19:38:43","modified_gmt":"2020-10-06T19:38:43","slug":"computer-science-breadth-first-search","status":"publish","type":"post","link":"https:\/\/www.oracletutoring.ca\/blog\/computer-science-breadth-first-search\/","title":{"rendered":"Computer science: breadth-first search"},"content":{"rendered":"\n<h2>Self-tutoring about computer science: the tutor mentions breadth-first search.<\/h2>\n<p>\nLet&#8217;s imagine you want to search for a book in your three-room apartment. In a breadth-first search (BFS), you&#8217;d plan to peek in each room in case it&#8217;s lying out where you can see it in one of them. If you don&#8217;t find it in that step, you&#8217;d search the bookshelf of each room (until you find it). Still not finding it, you&#8217;d search the desk of each room, and so on. The point is that you never search the &#8220;next&#8221; item (for instance, desk) in one room until you&#8217;ve searched the &#8220;previous&#8221; item (for instance, bookshelf) in all the rooms.<\/p>\n<p>In a folder system BFS means checking all adjacent folders before checking a folder inside one of them.<\/p>\n<p>Source:<\/p>\n<p>Goodrich, Michael T. and Roberto Tamassia. <em>Algorithm Design<\/em>. Hoboken: John Wiley &amp; sons, 2002.<\/p>\nJack of <a href=\"https:\/\/www.oracletutoring.ca\">Oracle Tutoring by Jack and Diane,<\/a> Campbell River, BC.\n","protected":false},"excerpt":{"rendered":"<p>Self-tutoring about computer science: the tutor mentions breadth-first search. Let&#8217;s imagine you want to search for a book in your three-room apartment. In a breadth-first search (BFS), you&#8217;d plan to peek in each room in case it&#8217;s lying out where &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"more-link\" href=\"https:\/\/www.oracletutoring.ca\/blog\/computer-science-breadth-first-search\/\"> <span class=\"screen-reader-text\">Computer science: breadth-first search<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2997],"tags":[],"class_list":["post-40237","post","type-post","status-publish","format-standard","hentry","category-algorithms"],"_links":{"self":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/40237","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/comments?post=40237"}],"version-history":[{"count":2,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/40237\/revisions"}],"predecessor-version":[{"id":40239,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/40237\/revisions\/40239"}],"wp:attachment":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/media?parent=40237"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/categories?post=40237"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/tags?post=40237"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}