Tags

Tree

LeetCode 2477 Minimum Fuel Cost to Report to the Capital (Python)


LeetCode 144 Binary Tree Preorder Traversal (Python)


LeetCode 145 Binary Tree Postorder Traversal (Python)


LeetCode 94 Binary Tree Inorder Traversal (Python)


LeetCode 589 N-ary Tree Preorder Traversal (Python)


LeetCode 623 Add One Row to Tree (Python)


LeetCode 637 Average of Levels in Binary Tree (Python)


LeetCode 1457 Pseudo-Palindromic Paths in a Binary Tree (Python)


LeetCode 865 Smallest Subtree with all the Deepest Nodes (Python)


LeetCode 104 Maximum Depth of Binary Tree (Python)


LeetCode 117 Populating Next Right Pointers in Each Node II (Python)


LeetCode 1026 Maximum Difference Between Node and Ancestor (Python)


LeetCode 563 Binary Tree Tilt (Python)


LeetCode 111 Minimum Depth of Binary Tree (Python)


LeetCode 404 Sum of Left Leaves (Python)


LeetCode 437 Path Sum III (Python)


LeetCode 987 Vertical Order Traversal of a Binary Tree (Python)


LeetCode 106 Construct Binary Tree from Inorder and Postorder Traversal (Python)


LeetCode 103 Binary Tree Zigzag Level Order Traversal (Python)


LeetCode 100 Same Tree (Python)


LeetCode 222 Count Complete Tree Nodes (Python)


LeetCode 662 Maximum Width of Binary Tree (Python)


LeetCode 226 Invert Binary Tree (Python)


LeetCode 1448 Count Good Nodes in Binary Tree (Python)


LeetCode 1443 Minimum Time to Collect All Apples in a Tree (Python)


LeetCode Cousins in Binary Tree (Python)


LeetCode Check If a String Is a Valid Sequence from Root to Leaves Path in a Binary Tree (Python)


LeetCode 124 Binary Tree Maximum Path Sum (Python)


LeetCode 543 Diameter of Binary Tree (Python)


LeetCode 1008 Construct Binary Search Tree from Preorder Traversal (Python)


LeetCode 1379 Find a Corresponding Node of a Binary Tree in a Clone of That Tree (Python)


DFS

LeetCode 1778 Shortest Path in a Hidden Grid (Python)


LeetCode 543 Diameter of Binary Tree (Python)


LeetCode 333 Largest BST Subtree (Python)


LeetCode 426 Convert Binary Search Tree to Sorted Doubly Linked List (Python)


LeetCode 339 Nested List Weight Sum (Python)


LeetCode 1644 Lowest Common Ancestor of a Binary Tree II (Python)


LeetCode 236 Lowest Common Ancestor of a Binary Tree (Python)


LeetCode 2421 Number of Good Paths (Python)


LeetCode 2316 Count Unreachable Pairs of Nodes in an Undirected Graph (Python)


LeetCode 1020 Number of Enclaves (Python)


LeetCode 1466 Reorder Routes to Make All Paths Lead to the City Zero (Python)


Leetcode 1254 Number of Closed Islands (Python)


LeetCode 1339 Maximum Product of Splitted Binary Tree (Python)


LeetCode 113 Path Sum II (Python)


LeetCode 827 Making A Large Island (Python)


LeetCode 417 Pacific Atlantic Water Flow (Python)


LeetCode 841 Keys and Rooms (Python)


LeetCode 785 Is Graph Bipartite (Python)


LeetCode 199 Binary Tree Right Side View (Python)


LeetCode 1457 Pseudo-Palindromic Paths in a Binary Tree (Python)


LeetCode 110 Balanced Binary Tree (Python)


LeetCode 865 Smallest Subtree with all the Deepest Nodes (Python)


LeetCode 1306 Jump Game III (Python)


LeetCode 1026 Maximum Difference Between Node and Ancestor (Python)


LeetCode 563 Binary Tree Tilt (Python)


LeetCode 133 Clone Graph (Python)


LeetCode 1022 Sum of Root To Leaf Binary Numbers (Python)


LeetCode 490 The Maze (Python)


LeetCode 437 Path Sum III (Python)


LeetCode 140 Word Break II (Python)


LeetCode 79 Word Search (Python)


LeetCode 212 Word Search II (Python)


LeetCode 332 Reconstruct Itinerary (Python)


LeetCode 129 Sum Root to Leaf Numbers (Python)


LeetCode 130 Surrounded Regions (Python)


LeetCode 207 Course Schedule (Python)


LeetCode 886 Possible Bipartition (Python)


LeetCode 1448 Count Good Nodes in Binary Tree (Python)


LeetCode 733 Flood Fill (Python)


LeetCode 1443 Minimum Time to Collect All Apples in a Tree (Python)


LeetCode Check If a String Is a Valid Sequence from Root to Leaves Path in a Binary Tree (Python)


LeetCode 124 Binary Tree Maximum Path Sum (Python)


LeetCode 200 Number of Islands (Python)


LeetCode 526 Beautiful Arrangement (Python)


Greedy

LeetCode 670 Maximum Swap (Python)


LeetCode 2405 Optimal Partition of String (Python)


LeetCode 2439 Minimize Maximum of Array (Python)


LeetCode 1402 Reducing Dishes (Python)


LeetCode 1675 Minimize Deviation in Array (Python)


LeetCode 502 IPO (Python)


LeetCode 2477 Minimum Fuel Cost to Report to the Capital (Python)


LeetCode 954 Array of Doubled Pairs (Python)


LeetCode 968 Binary Tree Cameras (Python)


LeetCode 1642 Furthest Building You Can Reach (Python)


LeetCode 376 Wiggle Subsequence (Python)


LeetCode 1663 Smallest String With A Given Numeric Value (Python)


LeetCode 1673 Find the Most Competitive Subsequence (Python)


LeetCode 910 Smallest Range II (Python)


LeetCode 605 Can Place Flowers (Python)


LeetCode 1217 Minimum Cost to Move Chips to The Same Position (Python)


LeetCode 948 Bag of Tokens (Python)


LeetCode LeetCode 每日一题 Daily Challenge 188 Best Time to Buy and Sell Stock IV (Python)


LeetCode 316 Remove Duplicate Letters (Python)


LeetCode 452 Minimum Number of Arrows to Burst Balloons (Python)


LeetCode 1288 Remove Covered Intervals (Python)


LeetCode 134 Gas Station (Python)


LeetCode 121 Best Time to Buy and Sell Stock (Python)


LeetCode 435 Non-overlapping Intervals (Python)


LeetCode 621 Task Scheduler (Python)


LeetCode 406 Queue Reconstruction by Height (Python)


LeetCode 1029 Two City Scheduling (Python)


LeetCode 402 Remove K Digits (Python)


LeetCode 1046 Last Stone Weight (Python)


LeetCode 55 Jump Game (Python)


LeetCode 122 Best Time to Buy and Sell Stock II (Python)


LeetCode 881 Boats to Save People (Python)


Math

LeetCode 296 Best Meeting Point (Python)


LeetCode 319 Bulb Switcher (Python)


LeetCode 989 Add to Array-Form of Integer (Python)


LeetCode 1523 Count Odd Numbers in an Interval Range (Python)


LeetCode 1071 Greatest Common Divisor of Strings (Python)


LeetCode 633 Sum of Square Numbers (Python)


LeetCode 537 Complex Number Multiplication (Python)


LeetCode 877 Stone Game (Python)


LeetCode 906 Super Palindromes (Python)


LeetCode 509 Fibonacci Number (Python)


LeetCode 1551 Minimum Operations to Make Array Equal (Python)


LeetCode 923 3Sum With Multiplicity (Python)


LeetCode 869 Reordered Power of 2 (Python)


LeetCode 478 Generate Random Point in a Circle (Python)


LeetCode 268 Missing Number (Python)


LeetCode 645 Set Mismatch (Python)


LeetCode 13 Roman to Integer (Python)


LeetCode 413 Arithmetic Slices (Python)


LeetCode 1641 Count Sorted Vowel Strings (Python)


LeetCode 1492 The kth Factor of n (Python)


LeetCode 1015 Smallest Integer Divisible by K (Python)


LeetCode 902 Numbers At Most N Given Digit Set (Python)


LeetCode 858 Mirror Reflection (Python)


LeetCode 458 Poor Pigs (Python)


LeetCode 593 Valid Square (Python)


LeetCode 1041 Robot Bounded In Circle (Python)


LeetCode 949 Largest Time for Given Digits (Python)


LeetCode 952 Largest Component Size by Common Factor (Python)


LeetCode 1103 Distribute Candies to People (Python)


LeetCode 171 Excel Sheet Column Number (Python)


LeetCode 258 Add Digits (Python)


LeetCode 67 Add Binary (Python)


LeetCode 50 Pow(x, n) (Python)


LeetCode 1344 Angle Between Hands of a Clock (Python)


LeetCode LeetCode 1515 Best Position for a Service Centre (Python)


LeetCode 1502 Can Make Arithmetic Progression From Sequence (Python)


LeetCode 441 Arranging Coins (Python)


LeetCode 62 Unique Paths (Python)


LeetCode 279 Perfect Squares (Python)


LeetCode 60 Permutation Sequence (Python)


LeetCode Leetcode 1447 Simplified Fractions (Python)


LeetCode 1442 Count Triplets That Can Form Two Arrays of Equal XOR (Python)


LeetCode 367 Valid Perfect Square (Python)


LeetCode 1232 Check If It Is a Straight Line (Python)


LeetCode 53 Maximum Subarray (Python)


LeetCode 202 Happy Number (Python)


DP

LeetCode 1216 Valid Palindrome III (Python)


LeetCode 1416 Restore The Array (Python)


LeetCode 87 Scramble String (Python)


LeetCode 91 Decode Ways (Python)


LeetCode 926 Flip String to Monotone Increasing (Python)


LeetCode 132 Palindrome Partitioning II (Python)


LeetCode 1048 Longest String Chain (Python)


LeetCode 63 Unique Paths II (Python)


LeetCode 120 Triangle (Python)


LeetCode 377 Combination Sum IV (Python)


LeetCode 714 Best Time to Buy and Sell Stock with Transaction Fee (Python)


LeetCode 823 Binary Trees With Factors (Python)


LeetCode 1463 Cherry Pickup II (Python)


LeetCode 312 Burst Balloons (Python)


LeetCode 416 Partition Equal Subset Sum (Python)


LeetCode 337 House Robber III (Python)


LeetCode 902 Numbers At Most N Given Digit Set (Python)


LeetCode 673 Number of Longest Increasing Subsequence (Python)


LeetCode 1510 Stone Game IV (Python)


LeetCode LeetCode 每日一题 Daily Challenge 188 Best Time to Buy and Sell Stock IV (Python)


LeetCode 213 House Robber II (Python)


LeetCode 198 House Robber (Python)


LeetCode 983 Minimum Cost For Tickets (Python)


LeetCode 123 Best Time to Buy and Sell Stock III (Python)


LeetCode 70 Climbing Stairs (Python)


LeetCode 309 Best Time to Buy and Sell Stock with Cooldown (Python)


LeetCode 264 Ugly Number II (Python)


LeetCode 62 Unique Paths (Python)


LeetCode 279 Perfect Squares (Python)


LeetCode 96 Unique Binary Search Trees (Python)


LeetCode 174 Dungeon Game (Python)


LeetCode 368 Largest Divisible Subset (Python)


LeetCode 518 Coin Change 2 (Python)


LeetCode 72 Edit Distance (Python)


LeetCode 1035 Uncrossed Lines (Python)


LeetCode 1277 Count Square Submatrices with All Ones (Python)


LeetCode 1449 Form Largest Integer With Digits That Add up to Target (Python)


LeetCode 1444 Number of Ways of Cutting a Pizza (Python)


LeetCode 221 Maximal Square (Python)


LeetCode 64 Minimum Path Sum (Python)


LeetCode 1143 Longest Common Subsequence (Python)