{ "cells": [ { "cell_type": "markdown", "id": "3f88440c", "metadata": {}, "source": [ "## basics" ] }, { "cell_type": "markdown", "id": "b7da297b", "metadata": { "ExecuteTime": { "end_time": "2023-07-04T13:12:09.408610Z", "start_time": "2023-07-04T13:12:09.390134Z" } }, "source": [ "- 图上的 bfs、dfs,核心是遇到岔路的处理办法:\n", " - bfs,走走走走走,遇到一个分叉的地方(记为 a),沿着岔路口往前走,直到遇到新的岔路的地方(记为b),然后回溯返回到 a,沿着a,的下一个分叉走到新的分叉的位置;" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.9" }, "toc": { "base_numbering": 1, "nav_menu": {}, "number_sections": true, "sideBar": true, "skip_h1_title": false, "title_cell": "Table of Contents", "title_sidebar": "Contents", "toc_cell": false, "toc_position": {}, "toc_section_display": true, "toc_window_display": false } }, "nbformat": 4, "nbformat_minor": 5 }