> ## Documentation Index
> Fetch the complete documentation index at: https://leetcode-py.wisl.dev/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> leetcode-py is a Python LeetCode practice environment generator with one CLI: lcpy. It is not a service or platform.
> Each problem is a directory under leetcode/ with README.md, solution.py, test_solution.py, helpers.py, and playground.ipynb. lcpy gen creates them from JSON templates bundled with the package.
> Examples are backed by tests; copy them verbatim.

# Breadth-First Search in Python with Tests

> All 158 Breadth-First Search LeetCode problems with tested Python solutions.

Breadth-First Search holds 158 problems (17 Easy, 103 Medium, 38 Hard).
Generate any of them into the current directory with `lcpy gen -n <number>`.

| # | Problem | Difficulty | Solution |
| - | - | - | - |
| 100 | [Same Tree](https://leetcode-py.wisl.dev/problems/same-tree) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/same_tree/solution.py) |
| 101 | [Symmetric Tree](https://leetcode-py.wisl.dev/problems/symmetric-tree) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/symmetric_tree/solution.py) |
| 102 | [Binary Tree Level Order Traversal](https://leetcode-py.wisl.dev/problems/binary-tree-level-order-traversal) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/binary_tree_level_order_traversal/solution.py) |
| 103 | [Binary Tree Zigzag Level Order Traversal](https://leetcode-py.wisl.dev/problems/binary-tree-zigzag-level-order-traversal) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/binary_tree_zigzag_level_order_traversal/solution.py) |
| 104 | [Maximum Depth of Binary Tree](https://leetcode-py.wisl.dev/problems/maximum-depth-of-binary-tree) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_depth_of_binary_tree/solution.py) |
| 107 | [Binary Tree Level Order Traversal II](https://leetcode-py.wisl.dev/problems/binary-tree-level-order-traversal-ii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/binary_tree_level_order_traversal_ii/solution.py) |
| 111 | [Minimum Depth of Binary Tree](https://leetcode-py.wisl.dev/problems/minimum-depth-of-binary-tree) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_depth_of_binary_tree/solution.py) |
| 112 | [Path Sum](https://leetcode-py.wisl.dev/problems/path-sum) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/path_sum/solution.py) |
| 116 | [Populating Next Right Pointers In Each Node](https://leetcode-py.wisl.dev/problems/populating-next-right-pointers-in-each-node) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/populating_next_right_pointers_in_each_node/solution.py) |
| 117 | [Populating Next Right Pointers in Each Node II](https://leetcode-py.wisl.dev/problems/populating-next-right-pointers-in-each-node-ii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/populating_next_right_pointers_in_each_node_ii/solution.py) |
| 126 | [Word Ladder II](https://leetcode-py.wisl.dev/problems/word-ladder-ii) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/word_ladder_ii/solution.py) |
| 127 | [Word Ladder](https://leetcode-py.wisl.dev/problems/word-ladder) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/word_ladder/solution.py) |
| 130 | [Surrounded Regions](https://leetcode-py.wisl.dev/problems/surrounded-regions) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/surrounded_regions/solution.py) |
| 133 | [Clone Graph](https://leetcode-py.wisl.dev/problems/clone-graph) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/clone_graph/solution.py) |
| 199 | [Binary Tree Right Side View](https://leetcode-py.wisl.dev/problems/binary-tree-right-side-view) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/binary_tree_right_side_view/solution.py) |
| 200 | [Number of Islands](https://leetcode-py.wisl.dev/problems/number-of-islands) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/number_of_islands/solution.py) |
| 207 | [Course Schedule](https://leetcode-py.wisl.dev/problems/course-schedule) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/course_schedule/solution.py) |
| 210 | [Course Schedule II](https://leetcode-py.wisl.dev/problems/course-schedule-ii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/course_schedule_ii/solution.py) |
| 226 | [Invert Binary Tree](https://leetcode-py.wisl.dev/problems/invert-binary-tree) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/invert_binary_tree/solution.py) |
| 261 | [Graph Valid Tree](https://leetcode-py.wisl.dev/problems/graph-valid-tree) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/graph_valid_tree/solution.py) |
| 269 | [Alien Dictionary](https://leetcode-py.wisl.dev/problems/alien-dictionary) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/alien_dictionary/solution.py) |
| 279 | [Perfect Squares](https://leetcode-py.wisl.dev/problems/perfect-squares) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/perfect_squares/solution.py) |
| 286 | [Walls And Gates](https://leetcode-py.wisl.dev/problems/walls-and-gates) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/walls_and_gates/solution.py) |
| 297 | [Serialize and Deserialize Binary Tree](https://leetcode-py.wisl.dev/problems/serialize-and-deserialize-binary-tree) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/serialize_and_deserialize_binary_tree/solution.py) |
| 301 | [Remove Invalid Parentheses](https://leetcode-py.wisl.dev/problems/remove-invalid-parentheses) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/remove_invalid_parentheses/solution.py) |
| 302 | [Smallest Rectangle Enclosing Black Pixels](https://leetcode-py.wisl.dev/problems/smallest-rectangle-enclosing-black-pixels) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/smallest_rectangle_enclosing_black_pixels/solution.py) |
| 310 | [Minimum Height Trees](https://leetcode-py.wisl.dev/problems/minimum-height-trees) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_height_trees/solution.py) |
| 314 | [Binary Tree Vertical Order Traversal](https://leetcode-py.wisl.dev/problems/binary-tree-vertical-order-traversal) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/binary_tree_vertical_order_traversal/solution.py) |
| 317 | [Shortest Distance from All Buildings](https://leetcode-py.wisl.dev/problems/shortest-distance-from-all-buildings) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/shortest_distance_from_all_buildings/solution.py) |
| 322 | [Coin Change](https://leetcode-py.wisl.dev/problems/coin-change) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/coin_change/solution.py) |
| 323 | [Number of Connected Components in an Undirected Graph](https://leetcode-py.wisl.dev/problems/number-of-connected-components-in-an-undirected-graph) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/number_of_connected_components_in_an_undirected_graph/solution.py) |
| 329 | [Longest Increasing Path in a Matrix](https://leetcode-py.wisl.dev/problems/longest-increasing-path-in-a-matrix) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/longest_increasing_path_in_a_matrix/solution.py) |
| 339 | [Nested List Weight Sum](https://leetcode-py.wisl.dev/problems/nested-list-weight-sum) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/nested_list_weight_sum/solution.py) |
| 364 | [Nested List Weight Sum II](https://leetcode-py.wisl.dev/problems/nested-list-weight-sum-ii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/nested_list_weight_sum_ii/solution.py) |
| 365 | [Water and Jug Problem](https://leetcode-py.wisl.dev/problems/water-and-jug-problem) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/water_and_jug_problem/solution.py) |
| 399 | [Evaluate Division](https://leetcode-py.wisl.dev/problems/evaluate-division) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/evaluate_division/solution.py) |
| 404 | [Sum of Left Leaves](https://leetcode-py.wisl.dev/problems/sum-of-left-leaves) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/sum_of_left_leaves/solution.py) |
| 407 | [Trapping Rain Water II](https://leetcode-py.wisl.dev/problems/trapping-rain-water-ii) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/trapping_rain_water_ii/solution.py) |
| 417 | [Pacific Atlantic Water Flow](https://leetcode-py.wisl.dev/problems/pacific-atlantic-water-flow) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/pacific_atlantic_water_flow/solution.py) |
| 428 | [Serialize and Deserialize N-ary Tree](https://leetcode-py.wisl.dev/problems/serialize-and-deserialize-n-ary-tree) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/serialize_and_deserialize_n_ary_tree/solution.py) |
| 429 | [N-ary Tree Level Order Traversal](https://leetcode-py.wisl.dev/problems/n-ary-tree-level-order-traversal) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/n_ary_tree_level_order_traversal/solution.py) |
| 431 | [Encode N-ary Tree to Binary Tree](https://leetcode-py.wisl.dev/problems/encode-n-ary-tree-to-binary-tree) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/encode_n_ary_tree_to_binary_tree/solution.py) |
| 433 | [Minimum Genetic Mutation](https://leetcode-py.wisl.dev/problems/minimum-genetic-mutation) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_genetic_mutation/solution.py) |
| 449 | [Serialize and Deserialize BST](https://leetcode-py.wisl.dev/problems/serialize-and-deserialize-bst) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/serialize_and_deserialize_bst/solution.py) |
| 463 | [Island Perimeter](https://leetcode-py.wisl.dev/problems/island-perimeter) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/island_perimeter/solution.py) |
| 488 | [Zuma Game](https://leetcode-py.wisl.dev/problems/zuma-game) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/zuma_game/solution.py) |
| 490 | [The Maze](https://leetcode-py.wisl.dev/problems/the-maze) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/the_maze/solution.py) |
| 499 | [The Maze III](https://leetcode-py.wisl.dev/problems/the-maze-iii) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/the_maze_iii/solution.py) |
| 505 | [The Maze II](https://leetcode-py.wisl.dev/problems/the-maze-ii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/the_maze_ii/solution.py) |
| 513 | [Find Bottom Left Tree Value](https://leetcode-py.wisl.dev/problems/find-bottom-left-tree-value) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_bottom_left_tree_value/solution.py) |
| 514 | [Freedom Trail](https://leetcode-py.wisl.dev/problems/freedom-trail) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/freedom_trail/solution.py) |
| 515 | [Find Largest Value in Each Tree Row](https://leetcode-py.wisl.dev/problems/find-largest-value-in-each-tree-row) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_largest_value_in_each_tree_row/solution.py) |
| 529 | [Minesweeper](https://leetcode-py.wisl.dev/problems/minesweeper) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minesweeper/solution.py) |
| 530 | [Minimum Absolute Difference in BST](https://leetcode-py.wisl.dev/problems/minimum-absolute-difference-in-bst) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_absolute_difference_in_bst/solution.py) |
| 542 | [01 Matrix](https://leetcode-py.wisl.dev/problems/zero-one-matrix) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/zero_one_matrix/solution.py) |
| 547 | [Number of Provinces](https://leetcode-py.wisl.dev/problems/number-of-provinces) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/number_of_provinces/solution.py) |
| 559 | [Maximum Depth of N-ary Tree](https://leetcode-py.wisl.dev/problems/maximum-depth-of-n-ary-tree) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_depth_of_n_ary_tree/solution.py) |
| 582 | [Kill Process](https://leetcode-py.wisl.dev/problems/kill-process) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/kill_process/solution.py) |
| 617 | [Merge Two Binary Trees](https://leetcode-py.wisl.dev/problems/merge-two-binary-trees) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/merge_two_binary_trees/solution.py) |
| 623 | [Add One Row to Tree](https://leetcode-py.wisl.dev/problems/add-one-row-to-tree) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/add_one_row_to_tree/solution.py) |
| 637 | [Average of Levels in Binary Tree](https://leetcode-py.wisl.dev/problems/average-of-levels-in-binary-tree) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/average_of_levels_in_binary_tree/solution.py) |
| 653 | [Two Sum IV - Input is a BST](https://leetcode-py.wisl.dev/problems/two-sum-iv-input-is-a-bst) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/two_sum_iv_input_is_a_bst/solution.py) |
| 655 | [Print Binary Tree](https://leetcode-py.wisl.dev/problems/print-binary-tree) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/print_binary_tree/solution.py) |
| 662 | [Maximum Width of Binary Tree](https://leetcode-py.wisl.dev/problems/maximum-width-of-binary-tree) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_width_of_binary_tree/solution.py) |
| 672 | [Bulb Switcher II](https://leetcode-py.wisl.dev/problems/bulb-switcher-ii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/bulb_switcher_ii/solution.py) |
| 675 | [Cut Off Trees for Golf Event](https://leetcode-py.wisl.dev/problems/cut-off-trees-for-golf-event) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/cut_off_trees_for_golf_event/solution.py) |
| 684 | [Redundant Connection](https://leetcode-py.wisl.dev/problems/redundant-connection) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/redundant_connection/solution.py) |
| 685 | [Redundant Connection II](https://leetcode-py.wisl.dev/problems/redundant-connection-ii) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/redundant_connection_ii/solution.py) |
| 690 | [Employee Importance](https://leetcode-py.wisl.dev/problems/employee-importance) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/employee_importance/solution.py) |
| 694 | [Number of Distinct Islands](https://leetcode-py.wisl.dev/problems/number-of-distinct-islands) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/number_of_distinct_islands/solution.py) |
| 695 | [Max Area of Island](https://leetcode-py.wisl.dev/problems/max-area-of-island) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/max_area_of_island/solution.py) |
| 711 | [Number of Distinct Islands II](https://leetcode-py.wisl.dev/problems/number-of-distinct-islands-ii) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/number_of_distinct_islands_ii/solution.py) |
| 721 | [Accounts Merge](https://leetcode-py.wisl.dev/problems/accounts-merge) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/accounts_merge/solution.py) |
| 733 | [Flood Fill](https://leetcode-py.wisl.dev/problems/flood-fill) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/flood_fill/solution.py) |
| 737 | [Sentence Similarity II](https://leetcode-py.wisl.dev/problems/sentence-similarity-ii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/sentence_similarity_ii/solution.py) |
| 742 | [Closest Leaf in a Binary Tree](https://leetcode-py.wisl.dev/problems/closest-leaf-in-a-binary-tree) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/closest_leaf_in_a_binary_tree/solution.py) |
| 743 | [Network Delay Time](https://leetcode-py.wisl.dev/problems/network-delay-time) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/network_delay_time/solution.py) |
| 749 | [Contain Virus](https://leetcode-py.wisl.dev/problems/contain-virus) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/contain_virus/solution.py) |
| 752 | [Open the Lock](https://leetcode-py.wisl.dev/problems/open-the-lock) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/open_the_lock/solution.py) |
| 765 | [Couples Holding Hands](https://leetcode-py.wisl.dev/problems/couples-holding-hands) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/couples_holding_hands/solution.py) |
| 773 | [Sliding Puzzle](https://leetcode-py.wisl.dev/problems/sliding-puzzle) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/sliding_puzzle/solution.py) |
| 778 | [Swim in Rising Water](https://leetcode-py.wisl.dev/problems/swim-in-rising-water) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/swim_in_rising_water/solution.py) |
| 783 | [Minimum Distance Between BST Nodes](https://leetcode-py.wisl.dev/problems/min-distance-in-bst) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/min_distance_in_bst/solution.py) |
| 785 | [Is Graph Bipartite?](https://leetcode-py.wisl.dev/problems/is-graph-bipartite) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/is_graph_bipartite/solution.py) |
| 787 | [Cheapest Flights Within K Stops](https://leetcode-py.wisl.dev/problems/cheapest-flights-within-k-stops) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/cheapest_flights_within_k_stops/solution.py) |
| 797 | [All Paths From Source to Target](https://leetcode-py.wisl.dev/problems/all-paths-source-target) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/all_paths_source_target/solution.py) |
| 802 | [Find Eventual Safe States](https://leetcode-py.wisl.dev/problems/find-eventual-safe-states) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_eventual_safe_states/solution.py) |
| 815 | [Bus Routes](https://leetcode-py.wisl.dev/problems/bus-routes) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/bus_routes/solution.py) |
| 827 | [Making A Large Island](https://leetcode-py.wisl.dev/problems/making-a-large-island) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/making_a_large_island/solution.py) |
| 839 | [Similar String Groups](https://leetcode-py.wisl.dev/problems/similar-string-groups) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/similar_string_groups/solution.py) |
| 841 | [Keys and Rooms](https://leetcode-py.wisl.dev/problems/keys-and-rooms) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/keys_and_rooms/solution.py) |
| 847 | [Shortest Path Visiting All Nodes](https://leetcode-py.wisl.dev/problems/shortest-path-visiting-all-nodes) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/shortest_path_visiting_all_nodes/solution.py) |
| 854 | [K-Similar Strings](https://leetcode-py.wisl.dev/problems/k-similarity) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/k_similarity/solution.py) |
| 863 | [All Nodes Distance K in Binary Tree](https://leetcode-py.wisl.dev/problems/all-nodes-distance-k-in-binary-tree) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/all_nodes_distance_k_in_binary_tree/solution.py) |
| 864 | [Shortest Path to Get All Keys](https://leetcode-py.wisl.dev/problems/shortest-path-to-get-all-keys) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/shortest_path_to_get_all_keys/solution.py) |
| 865 | [Smallest Subtree with all the Deepest Nodes](https://leetcode-py.wisl.dev/problems/smallest-subtree-with-all-the-deepest-nodes) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/smallest_subtree_with_all_the_deepest_nodes/solution.py) |
| 886 | [Possible Bipartition](https://leetcode-py.wisl.dev/problems/possible-bipartition) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/possible_bipartition/solution.py) |
| 909 | [Snakes and Ladders](https://leetcode-py.wisl.dev/problems/snakes-and-ladders) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/snakes_and_ladders/solution.py) |
| 919 | [Complete Binary Tree Inserter](https://leetcode-py.wisl.dev/problems/complete-binary-tree-inserter) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/complete_binary_tree_inserter/solution.py) |
| 924 | [Minimize Malware Spread](https://leetcode-py.wisl.dev/problems/minimize-malware-spread) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimize_malware_spread/solution.py) |
| 928 | [Minimize Malware Spread II](https://leetcode-py.wisl.dev/problems/minimize-malware-spread-ii) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimize_malware_spread_ii/solution.py) |
| 934 | [Shortest Bridge](https://leetcode-py.wisl.dev/problems/shortest-bridge) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/shortest_bridge/solution.py) |
| 958 | [Check Completeness of a Binary Tree](https://leetcode-py.wisl.dev/problems/check-completeness-of-a-binary-tree) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/check_completeness_of_a_binary_tree/solution.py) |
| 959 | [Regions Cut By Slashes](https://leetcode-py.wisl.dev/problems/regions-cut-by-slashes) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/regions_cut_by_slashes/solution.py) |
| 965 | [Univalued Binary Tree](https://leetcode-py.wisl.dev/problems/univalued-binary-tree) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/univalued_binary_tree/solution.py) |
| 967 | [Numbers With Same Consecutive Differences](https://leetcode-py.wisl.dev/problems/numbers-with-same-consecutive-differences) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/numbers_with_same_consecutive_differences/solution.py) |
| 987 | [Vertical Order Traversal of a Binary Tree](https://leetcode-py.wisl.dev/problems/vertical-order-traversal-of-a-binary-tree) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/vertical_order_traversal_of_a_binary_tree/solution.py) |
| 993 | [Cousins in Binary Tree](https://leetcode-py.wisl.dev/problems/cousins-in-binary-tree) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/cousins_in_binary_tree/solution.py) |
| 994 | [Rotting Oranges](https://leetcode-py.wisl.dev/problems/rotting-oranges) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/rotting_oranges/solution.py) |
| 1020 | [Number of Enclaves](https://leetcode-py.wisl.dev/problems/number-of-enclaves) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/number_of_enclaves/solution.py) |
| 1087 | [Brace Expansion](https://leetcode-py.wisl.dev/problems/brace-expansion) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/brace_expansion/solution.py) |
| 1091 | [Shortest Path in Binary Matrix](https://leetcode-py.wisl.dev/problems/shortest-path-in-binary-matrix) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/shortest_path_in_binary_matrix/solution.py) |
| 1102 | [Path With Maximum Minimum Value](https://leetcode-py.wisl.dev/problems/path-with-maximum-minimum-value) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/path_with_maximum_minimum_value/solution.py) |
| 1129 | [Shortest Path with Alternating Colors](https://leetcode-py.wisl.dev/problems/shortest-path-with-alternating-colors) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/shortest_path_with_alternating_colors/solution.py) |
| 1162 | [As Far from Land as Possible](https://leetcode-py.wisl.dev/problems/as-far-from-land-as-possible) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/as_far_from_land_as_possible/solution.py) |
| 1197 | [Minimum Knight Moves](https://leetcode-py.wisl.dev/problems/minimum-knight-moves) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_knight_moves/solution.py) |
| 1215 | [Stepping Numbers](https://leetcode-py.wisl.dev/problems/stepping-numbers) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/stepping_numbers/solution.py) |
| 1236 | [Web Crawler](https://leetcode-py.wisl.dev/problems/web-crawler) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/web_crawler/solution.py) |
| 1245 | [Tree Diameter](https://leetcode-py.wisl.dev/problems/tree-diameter) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/tree_diameter/solution.py) |
| 1254 | [Number of Closed Islands](https://leetcode-py.wisl.dev/problems/number-of-closed-islands) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/number_of_closed_islands/solution.py) |
| 1267 | [Count Servers that Communicate](https://leetcode-py.wisl.dev/problems/count-servers-that-communicate) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/count_servers_that_communicate/solution.py) |
| 1273 | [Delete Tree Nodes](https://leetcode-py.wisl.dev/problems/delete-tree-nodes) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/delete_tree_nodes/solution.py) |
| 1361 | [Validate Binary Tree Nodes](https://leetcode-py.wisl.dev/problems/validate-binary-tree-nodes) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/validate_binary_tree_nodes/solution.py) |
| 1367 | [Linked List in Binary Tree](https://leetcode-py.wisl.dev/problems/linked-list-in-binary-tree) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/linked_list_in_binary_tree/solution.py) |
| 1368 | [Minimum Cost to Make at Least One Valid Path in a Grid](https://leetcode-py.wisl.dev/problems/minimum-cost-to-make-at-least-one-valid-path-in-a-grid) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_cost_to_make_at_least_one_valid_path_in_a_grid/solution.py) |
| 1376 | [Time Needed to Inform All Employees](https://leetcode-py.wisl.dev/problems/time-needed-to-inform-all-employees) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/time_needed_to_inform_all_employees/solution.py) |
| 1443 | [Minimum Time to Collect All Apples in a Tree](https://leetcode-py.wisl.dev/problems/minimum-time-to-collect-all-apples-in-a-tree) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_time_to_collect_all_apples_in_a_tree/solution.py) |
| 1448 | [Count Good Nodes in Binary Tree](https://leetcode-py.wisl.dev/problems/count-good-nodes-in-binary-tree) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/count_good_nodes_in_binary_tree/solution.py) |
| 1457 | [Pseudo-Palindromic Paths in a Binary Tree](https://leetcode-py.wisl.dev/problems/pseudo-palindromic-paths-in-a-binary-tree) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/pseudo_palindromic_paths_in_a_binary_tree/solution.py) |
| 1462 | [Course Schedule IV](https://leetcode-py.wisl.dev/problems/course-schedule-iv) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/course_schedule_iv/solution.py) |
| 1466 | [Reorder Routes to Make All Paths Lead to the City Zero](https://leetcode-py.wisl.dev/problems/reorder-routes-to-make-all-paths-lead-to-the-city-zero) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/reorder_routes_to_make_all_paths_lead_to_the_city_zero/solution.py) |
| 1490 | [Clone N-ary Tree](https://leetcode-py.wisl.dev/problems/clone-n-ary-tree) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/clone_n_ary_tree/solution.py) |
| 1568 | [Minimum Number of Days to Disconnect Island](https://leetcode-py.wisl.dev/problems/minimum-number-of-days-to-disconnect-island) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_number_of_days_to_disconnect_island/solution.py) |
| 1609 | [Even Odd Tree](https://leetcode-py.wisl.dev/problems/even-odd-tree) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/even_odd_tree/solution.py) |
| 1631 | [Path With Minimum Effort](https://leetcode-py.wisl.dev/problems/path-with-minimum-effort) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/path_with_minimum_effort/solution.py) |
| 1730 | [Shortest Path to Get Food](https://leetcode-py.wisl.dev/problems/shortest-path-to-get-food) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/shortest_path_to_get_food/solution.py) |
| 1905 | [Count Sub Islands](https://leetcode-py.wisl.dev/problems/count-sub-islands) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/count_sub_islands/solution.py) |
| 1993 | [Operations on Tree](https://leetcode-py.wisl.dev/problems/operations-on-tree) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/operations_on_tree/solution.py) |
| 2045 | [Second Minimum Time to Reach Destination](https://leetcode-py.wisl.dev/problems/second-minimum-time-to-reach-destination) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/second_minimum_time_to_reach_destination/solution.py) |
| 2092 | [Find All People With Secret](https://leetcode-py.wisl.dev/problems/find-all-people-with-secret) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_all_people_with_secret/solution.py) |
| 2101 | [Detonate the Maximum Bombs](https://leetcode-py.wisl.dev/problems/detonate-the-maximum-bombs) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/detonate_the_maximum_bombs/solution.py) |
| 2290 | [Minimum Obstacle Removal to Reach Corner](https://leetcode-py.wisl.dev/problems/minimum-obstacle-removal-to-reach-corner) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_obstacle_removal_to_reach_corner/solution.py) |
| 2415 | [Reverse Odd Levels of Binary Tree](https://leetcode-py.wisl.dev/problems/reverse-odd-levels-of-binary-tree) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/reverse_odd_levels_of_binary_tree/solution.py) |
| 2467 | [Most Profitable Path in a Tree](https://leetcode-py.wisl.dev/problems/most-profitable-path-in-a-tree) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/most_profitable_path_in_a_tree/solution.py) |
| 2471 | [Minimum Number of Operations to Sort a Binary Tree by Level](https://leetcode-py.wisl.dev/problems/minimum-operations-to-sort-a-binary-tree-by-level) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_operations_to_sort_a_binary_tree_by_level/solution.py) |
| 2477 | [Minimum Fuel Cost to Report to the Capital](https://leetcode-py.wisl.dev/problems/minimum-fuel-cost-to-report-to-the-capital) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_fuel_cost_to_report_to_the_capital/solution.py) |
| 2492 | [Minimum Score of a Path Between Two Cities](https://leetcode-py.wisl.dev/problems/minimum-score-of-a-path-between-two-cities) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_score_of_a_path_between_two_cities/solution.py) |
| 2493 | [Divide Nodes Into the Maximum Number of Groups](https://leetcode-py.wisl.dev/problems/divide-nodes-into-the-maximum-number-of-groups) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/divide_nodes_into_the_maximum_number_of_groups/solution.py) |
| 2503 | [Maximum Number of Points From Grid Queries](https://leetcode-py.wisl.dev/problems/maximum-number-of-points-from-grid-queries) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_number_of_points_from_grid_queries/solution.py) |
| 2577 | [Minimum Time to Visit a Cell In a Grid](https://leetcode-py.wisl.dev/problems/minimum-time-to-visit-a-cell-in-a-grid) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_time_to_visit_a_cell_in_a_grid/solution.py) |
| 2583 | [Kth Largest Sum in a Binary Tree](https://leetcode-py.wisl.dev/problems/kth-largest-sum-in-a-binary-tree) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/kth_largest_sum_in_a_binary_tree/solution.py) |
| 2641 | [Cousins in Binary Tree II](https://leetcode-py.wisl.dev/problems/cousins-in-binary-tree-ii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/cousins_in_binary_tree_ii/solution.py) |
| 2658 | [Maximum Number of Fish in a Grid](https://leetcode-py.wisl.dev/problems/maximum-number-of-fish-in-a-grid) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_number_of_fish_in_a_grid/solution.py) |
| 2685 | [Count the Number of Complete Components](https://leetcode-py.wisl.dev/problems/count-complete-components) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/count_complete_components/solution.py) |
| 2812 | [Find the Safest Path in a Grid](https://leetcode-py.wisl.dev/problems/find-the-safest-path-in-a-grid) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_the_safest_path_in_a_grid/solution.py) |
| 3203 | [Find Minimum Diameter After Merging Two Trees](https://leetcode-py.wisl.dev/problems/find-minimum-diameter-after-merging-two-trees) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_minimum_diameter_after_merging_two_trees/solution.py) |
| 3243 | [Shortest Distance After Road Addition Queries I](https://leetcode-py.wisl.dev/problems/shortest-distance-after-queries-i) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/shortest_distance_after_queries_i/solution.py) |
| 3481 | [Apply Substitutions](https://leetcode-py.wisl.dev/problems/apply-substitutions) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/apply_substitutions/solution.py) |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.