I&#x27;m sorry, but breadth-first-search is a simple and fundamental algorithm and straightforward to write if you understand the concept and have decent coding skills. You&#x27;re just visiting a level of the tree at a time: stick each level in a list, iterate over it, and append the next level&#x27;s nodes to the next list. There&#x27;s no trick to it.<p>Not being able to do write a basic BFS algorithm suggests a) you didn&#x27;t do any interview prep and b) whatever you&#x27;ve been working on hasn&#x27;t involved any non-trivial algorithms.<p>It doesn&#x27;t mean you&#x27;re a bad programmer but if you can&#x27;t answer a basic BFS algorithms question I wouldn&#x27;t trust you to touch code with any non-trivial algorithms in it.