Python Tutorials
Browse Python problem-solving guides focused on clear reasoning, working code, edge cases, and complexity. These tutorials are written for developers who want a quick path from problem statement to implementation.
Python Algorithm Guides
- K-Concatenation Maximum Sum in Python - January 3, 2021
Solve K-Concatenation Maximum Sum in Python with Kadane style logic, modular arithmetic, edge cases, and a clear implementation.
- Maximum Subarray Sum with One Deletion in Python - January 3, 2021
Solve Maximum Subarray Sum with One Deletion in Python using dynamic programming, running states, and examples for tricky arrays.
- Reverse Parentheses Substrings in Python - January 3, 2021
Solve Reverse Substrings Between Each Pair of Parentheses in Python with stack-based parsing and examples for nested expressions.
- Count Servers that Communicate in Python - August 22, 2020
Solve Count Servers that Communicate in Python by scanning rows and columns, counting shared servers, and handling grid edge cases.
- Count Square Submatrices with All Ones in Python - August 22, 2020
Solve Count Square Submatrices with All Ones in Python using dynamic programming to count every valid square in a binary matrix.
- Find Winner on a Tic Tac Toe Game in Python - August 22, 2020
Solve Find Winner on a Tic Tac Toe Game in Python by tracking rows, columns, diagonals, move order, and draw or pending states.
- Minimum Absolute Difference in Python - August 22, 2020
Solve Minimum Absolute Difference in Python by sorting values, scanning adjacent pairs, and returning every pair with the smallest gap.
- Minimum Time Visiting All Points in Python - August 22, 2020
Solve Minimum Time Visiting All Points in Python by using Chebyshev distance between points and summing each move in order.
- Number of Burgers with No Waste of Ingredients in Python - August 22, 2020
Solve Number of Burgers with No Waste of Ingredients in Python by deriving jumbo and small burger counts from tomato and cheese slices.
- Search Suggestions System in Python - August 22, 2020
Solve Search Suggestions System in Python by sorting products, matching each prefix, and returning up to three suggestions per step.
- Divide Array in Sets of K Consecutive Numbers in Python - April 19, 2020
Solve Divide Array in Sets of K Consecutive Numbers in Python with frequency counts, ordered starts, and checks for invalid groups.
- Find Numbers with Even Number of Digits in Python - April 19, 2020
Solve Find Numbers with Even Number of Digits in Python by counting digits efficiently and returning how many numbers have even length.
- Find the Smallest Divisor Given a Threshold in Python - April 19, 2020
Solve Find the Smallest Divisor Given a Threshold in Python with binary search, ceiling division, and boundary checks.
- Group People by Group Size in Python - April 19, 2020
Solve Group the People Given the Group Size They Belong To in Python by collecting indices by size and emitting complete groups.
- Sequential Digits in Python - April 19, 2020
Solve Sequential Digits in Python by generating ordered digit numbers, filtering the requested range, and returning sorted results.