Red-Green-Code

Deliberate practice techniques for software developers

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

Quora: How Do I Get Faster at Solving Programming Problems?

By Duncan Smith Leave a Comment Jun 5 0

Red-Green-Code Quora 2021

Code quality is important, but speed is also a factor in programmer productivity:

It takes me a lot of time to solve programming problems. How do I get faster? (answer)

I’m writing some answers on Quora this year. For more information, see A Project for 2021.

Quora: Which is More Beneficial for the Brain, Solving Chess Problems or Solving Coding Challenges?

By Duncan Smith Leave a Comment May 29 0

Red-Green-Code Quora 2021

Braiiiiins….

Which is more beneficial for the brain, solving chess problems or solving coding challenges? (answer)

I’m writing some answers on Quora this year. For more information, see A Project for 2021.

Quora: How Do I Solve Dynamic Programming Problems?

By Duncan Smith Leave a Comment May 22 0

Red-Green-Code Quora 2021

A follow-up to last week’s question:

How do I solve dynamic programming problems? (answer)

I’m writing some answers on Quora this year. For more information, see A Project for 2021.

Quora: Can an introductory problem be solved using dynamic programming?

By Duncan Smith Leave a Comment May 15 0

Red-Green-Code Quora 2021

To answer this question, I used an example from LeetCode:

Can an introductory problem be solved using dynamic programming? (answer)

I’m writing some answers on Quora this year. For more information, see A Project for 2021.

Quora: Why Doesn’t Project Euler Have Editorials?

By Duncan Smith Leave a Comment May 8 0

Red-Green-Code Quora 2021

In the world of competitive programming, an editorial is an article that explains the solution to a problem. Project Euler is different from competitive programming sites, and they also have a different philosophy about editorials:

Why does Project Euler not have any editorials? (answer)

I’m writing some answers on Quora this year. For more information, see A Project for 2021.

Quora: How to Read Cracking the Coding Interview

By Duncan Smith Leave a Comment Apr 21 0

Red-Green-Code Quora 2021

Books, especially technical ones, aren’t all organized the same way, so it’s good to have a plan for reading them:

Should I first try to solve the problems from Cracking the Coding interview or read the book? (answer)

I’m writing some answers on Quora this year. For more information, see A Project for 2021.

Quora: What to Do When You’re Stuck on a Competitive Programming Problem

By Duncan Smith Leave a Comment Apr 14 0

Red-Green-Code Quora 2021

Some advice about what to do when you’re stuck on a coding puzzle:

What should I do when I’m at the point where I can’t solve a competitive programming question? (answer)

I’m writing some answers on Quora this year. For more information, see A Project for 2021.

Quora: How to Get Better at Competitive Programming

By Duncan Smith Leave a Comment Apr 7 0

Red-Green-Code Quora 2021

Versions of this question pop up regularly on Quora. Here are my current thoughts on the topic:

What is an absolute best way to become better at competitive programming? I know practice is the most important thing, but what kind of schedule would I need for this (problems a day, difficulty of problems, etc.), and are there any other tips? (answer)

I’m writing some answers on Quora this year. For more information, see A Project for 2021.

Quora: Is LeetCode Useful for Beginning Competitive Programmers?

By Duncan Smith Leave a Comment Mar 31 0

Red-Green-Code Quora 2021

If you’re interested in competitive programming, does it make sense to start with LeetCode, or should you use a traditional competitive programming platform like Codeforces or Topcoder?

Is LeetCode good as a starting point for competitive programming? (answer)

I’m writing some answers on Quora this year. For more information, see A Project for 2021.

A Project for 2021

By Duncan Smith Leave a Comment Jan 6 0

January 1 2021

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 plan to continue refining that process in the coming year.

Model Solutions

As I argued in last week’s process article, solving a new coding puzzle every day is useful, but it’s not the most efficient way to gain expertise. To learn these problems well, you have to repeatedly return to previously-solved problems until you’re intimately familiar with the algorithms, data structures, and techniques that come up regularly. The first step in this process of repetition is creating a model solution.

When you solve a LeetCode problem for the first time, the quality of your solution will vary a lot. If the problem is similar to one that you have already learned well, your solution might be close to optimal. If it requires an algorithm or technique that you have never learned, you might not be able to solve it at all. Or it could be somewhere in between.

If I decide to solve a problem a second time (because it meets my criteria for a good problem) and I didn’t find an optimal solution the first time around, I don’t just repeat my own solution. That would have the effect of reinforcing whatever shortcomings I included in the solution. Instead, I first do some research on how others have solved it. LeetCode sometimes has an official solution, but I find the LeetCode discussion forums to be even more useful, since they provide a range of ideas from multiple contributors. Using the advice I find in the discussions, I write a model solution consisting of both code and explanation. Although the code in my model solution often draws on a working solution from the discussions, I don’t just copy and paste it. I re-write the solution in my own style, make sure I understand what the code is doing, and submit my re-written version to ensure that it passes all the test cases. I also write an English description of the solution and, if necessary, create diagrams illustrating the solution details. As I practice the model solution over time, I update the code and the description to be more understandable and easier to learn.

Periodically this year, I plan to publish examples of these model solutions as blog posts, supported by code on GitHub.

Quora in 2021

In 2020, I decided to do my weekly writing in the form of Quora answers, which I linked here each week. I plan to do that again in 2021 on weeks that I don’t publish a model LeetCode solution. As always, I will also post a daily link in the Coder vs. Coder space on Quora.

The reason for using Quora in this way is the same as last year: Quora is still the place where a critical mass of people gather to discuss topics related to competitive programming and coding interviews. These topics also come up on Reddit, Hacker News, Codeforces, LeetCode, Stack Overflow (where they are immediately deleted), and other places. But for all its many faults (and they are numerous), Quora is a reasonably canonical online source for these topics, and there are always questions being asked there.

Good luck with your own projects in 2021!

(Image credit: JuliaC2006)

  • « Previous Page
  • 1
  • …
  • 7
  • 8
  • 9
  • 10
  • 11
  • …
  • 17
  • Next Page »

Stay in the Know

I'm trying out the latest learning techniques on software development concepts, and writing about what works best. Sound interesting? Subscribe to my free newsletter to keep up to date. Learn More
Unsubscribing is easy, and I'll keep your email address private.

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