This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # @lc app=leetcode id=572 lang=python3 | |
| # | |
| # [572] Subtree of Another Tree | |
| # | |
| from typing import Optional | |
| # @lc code=start | |
| # Definition for a binary tree node. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # @lc app=leetcode id=117 lang=python3 | |
| # | |
| # [117] Populating Next Right Pointers in Each Node II | |
| # | |
| # @lc code=start | |
| # Definition for a Node. | |
| class Node: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # @lc app=leetcode id=547 lang=python3 | |
| # | |
| # [547] Number of Provinces | |
| # | |
| from typing import List | |
| # @lc code=start | |
| class Solution: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # @lc app=leetcode id=200 lang=python3 | |
| # | |
| # [200] Number of Islands | |
| # | |
| from typing import List | |
| # @lc code=start | |
| class Solution: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # @lc app=leetcode id=209 lang=python3 | |
| # | |
| # [209] Minimum Size Subarray Sum | |
| # | |
| from typing import List | |
| # @lc code=start | |
| class Solution: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # @lc app=leetcode id=713 lang=python3 | |
| # | |
| # [713] Subarray Product Less Than K | |
| # | |
| from re import right | |
| from typing import List | |
| # @lc code=start |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # @lc app=leetcode id=438 lang=python3 | |
| # | |
| # [438] Find All Anagrams in a String | |
| # | |
| from ast import Delete | |
| from typing import List | |
| # @lc code=start |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # @lc app=leetcode id=11 lang=python3 | |
| # | |
| # [11] Container With Most Water | |
| # | |
| from typing import List | |
| # @lc code=start | |
| class Solution: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # @lc app=leetcode id=986 lang=python3 | |
| # | |
| # [986] Interval List Intersections | |
| # | |
| from typing import List | |
| # @lc code=start | |
| class Solution: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # @lc app=leetcode id=844 lang=python3 | |
| # | |
| # [844] Backspace String Compare | |
| # | |
| # @lc code=start | |
| class Solution: | |
| def backspaceCompare(self, s: str, t: str) -> bool: | |
| # go through each string, add each character to a stack |