Red-Green-Code

Deliberate practice techniques for software developers

  • Home
  • About
  • Contact
  • Project 462
  • CP FAQ
  • Newsletter

LeetCode 856: Score of Parentheses

By Duncan Smith Leave a Comment Mar 3 0

Problem LeetCode 856: Score of Parentheses (Medium) Problem Statement: You are given a string containing only the characters ( and ). The parentheses are guaranteed to be balanced (as in syntactically valid source code). Calculate a score using the following rules: () has a score of 1. AB has a score of A + B, […]

Continue

LeetCode 11: Container With Most Water

By Duncan Smith Leave a Comment Feb 24 0

Problem LeetCode 11: Container With Most Water (Medium) Problem Statement: In the coordinate plane, consider $n$ vertical lines starting at points $(1, 0), (2, 0), …, (n, 0)$ and ending at points $(1, h_1), (2, h_2), …, (n, h_n)$, where each $h_i$ is a non-negative integer. We can construct a rectangle whose sides are the […]

Continue

LeetCode 47: Permutations II

By Duncan Smith Leave a Comment Feb 17 0

Problem LeetCode 47: Permutations II (Medium) Problem Statement: Given a list of integers that may contain duplicates, return all possible unique permutations of those integers, in any order. A permutation is an arrangement of elements. For example, the three elements [1,2,3] can be arranged into $3!=6$ unique permutations: [1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], and [3,2,1]. […]

Continue

LeetCode 897: Increasing Order Search Tree

By Duncan Smith Leave a Comment Feb 10 0

Problem LeetCode 897: Increasing Order Search Tree (Easy) Problem Statement: Given a binary search tree (BST), rearrange it (preserving the BST order) so that the lowest node is at the root and each node only has a right child. The result is like a sorted linked list. The problem doesn’t mention any space requirements, and […]

Continue

LeetCode 394: Decode String

By Duncan Smith Leave a Comment Feb 3 0

Problem LeetCode 394: Decode String (Medium) Problem Statement: Decode a string that has been encoded in a specified format. In the encoded string, k[str] means decode the string str and repeat the result k times. The input encoding is always valid: k is always a positive integer, there is no extra whitespace, the square brackets […]

Continue

LeetCode 1022: Sum of Root To Leaf Binary Numbers

By Duncan Smith Leave a Comment Jan 27 0

Problem LeetCode 1022: Sum of Root To Leaf Binary Numbers (Easy) Problem statement: Given a binary tree where each node contains a binary digit, interpret each path from the root to a leaf as a binary number, with the root value as the high-order bit. Return the sum of these numbers. Solution This problem is […]

Continue

LeetCode 1288: Remove Covered Intervals

By Duncan Smith Leave a Comment Jan 20 0

Problem LeetCode 1288: Remove Covered Intervals (Medium) Problem statement: Given a list of intervals, return the number of intervals that are not covered by another interval in the list. For this problem, think of an interval as a segment of the number line with integer starting and ending points. For example, the interval $(-1, 1)$ […]

Continue

LeetCode 227: Basic Calculator II

By Duncan Smith Leave a Comment Jan 13 0

Problem LeetCode 227: Basic Calculator II (Medium) Problem statement: Evaluate a valid arithmetic expression containing only numbers, spaces, and the operators +, -, *, and /. This is almost as simple as an arithmetic expression evaluator can be. It’s simpler than the first Basic Calculator problem, which includes parentheses. The only trick in this version […]

Continue

A Project for 2021

By Duncan Smith Leave a Comment Jan 6 0

In the geeky world of programming puzzles, programming interviews, and competitive programming (loosely defined), LeetCode is one of the major players. And on LeetCode, 2021 begins with another month of LeetCoding Challenges. In my 2020 wrap-up post last week, I described the process that I use to get the most out of these challenges. I […]

Continue

Lessons from the 2020 LeetCode Monthly Challenges

By Duncan Smith Leave a Comment Dec 30 0

In late March of this year, the coding interview preparation site LeetCode announced a 30-Day LeetCoding Challenge. Each day during the month of April, they selected one of the coding problems from their archive and challenged developers to solve it within 24 hours. Newly locked-down developers throughout the world took up the challenge, earning LeetCoins […]

Continue
  • « Previous Page
  • 1
  • …
  • 16
  • 17
  • 18
  • 19
  • 20
  • …
  • 50
  • Next Page »

Getting Started

Are you new here? Check out my review posts for a tour of the archives:

  • 2023 in Review: 50 LeetCode Tips
  • 2022 in Review: Content Bots
  • 2021 in Review: Thoughts on Solving Programming Puzzles
  • Lessons from the 2020 LeetCode Monthly Challenges
  • 2019 in Review
  • Competitive Programming Frequently Asked Questions: 2018 In Review
  • What I Learned Working On Time Tortoise in 2017
  • 2016 in Review
  • 2015 in Review
  • 2015 Summer Review

Archives

Recent Posts

  • Will AI Coding Assistants “Deskill” Us? January 30, 2026
  • Stateless by Design: How to Work With AI Coding Assistants December 31, 2025
  • Do Coding Bots Mean the End of Coding Interviews? December 31, 2024
  • Another Project for 2024 May 8, 2024
  • Dynamic Programming Wrap-Up May 1, 2024
  • LeetCode 91: Decode Ways April 24, 2024
  • LeetCode 70: Climbing Stairs April 17, 2024
  • LeetCode 221: Maximal Square April 10, 2024
  • Using Dynamic Programming for Maximum Product Subarray April 3, 2024
  • LeetCode 62: Unique Paths March 27, 2024
Red-Green-Code
  • Home
  • About
  • Contact
  • Project 462
  • CP FAQ
  • Newsletter
Copyright © 2026 Duncan Smith