Red-Green-Code

Deliberate practice techniques for software developers

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

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

Quora: Are Math Courses Useful for Competitive Programming?

By Duncan Smith Leave a Comment Dec 23 0

Competitive programming seems to have a lot to do with math and algorithms, so it’s reasonable to ask: Does taking more mathematics classes improve competitive programming? (answer) I’m doing most of my writing on Quora this year. For more information, see A Project for 2020.

Continue

Quora: Are Take-Home Assignments a Good Interview Technique?

By Duncan Smith Leave a Comment Dec 17 0

As an alternative or supplement to LeetCode problems, what about using take-home assignments in interviews? Why do some companies give take home coding assessment as anyone could easily look up on how to solve those? (answer) I’m doing most of my writing on Quora this year. For more information, see A Project for 2020.

Continue
  • « Previous Page
  • 1
  • …
  • 16
  • 17
  • 18
  • 19
  • 20
  • …
  • 49
  • 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

  • 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
  • LeetCode 416: Partition Equal Subset Sum March 20, 2024
  • LeetCode 1143: Longest Common Subsequence March 13, 2024
Red-Green-Code
  • Home
  • About
  • Contact
  • Project 462
  • CP FAQ
  • Newsletter
Copyright © 2025 Duncan Smith