Red-Green-Code

Deliberate practice techniques for software developers

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

LeetCode Tip 2: A Sample Problem

By Duncan Smith Leave a Comment Jan 18 0

LeetCode 2023

To help make the upcoming tips less abstract, I’m going to start with a sample problem that I’ll refer to when needed: LeetCode problem 704, Binary Search. I chose binary search because it has a short implementation that uses only basic language features, but even experts have trouble getting it right.

« Continue »

LeetCode Tip 1: Why LeetCode?

By Duncan Smith Leave a Comment Jan 11 0

LeetCode 2023

We’re going to be covering LeetCode tips in the coming year. But before we get to the tips, I’d like to discuss why I chose LeetCode as a study topic, so you can decide if this year’s project is right for you.

I chose LeetCode because:

  • It focuses on coding interviews: There are several reasons you might want to study algorithmic coding problems. But for this year’s project, we’re going to focus on one: Preparing for a coding interview. We won’t ignore the other reasons entirely, but the focus will be on the practical goal of getting better at the coding interview process. This aligns with LeetCode’s strengths, as compared to a competitive programming site like Codeforces or a general textbook like Introduction to Algorithms.

  • It has an active community: There are other sites for building coding interview skills. But LeetCode’s popularity gives it some advantages compared to other sites: It has an active discussion section for every problem, two weekly contests generate a regular supply of fresh problems, and the LeetCode company receives enough income to keep the site up to date. There are many programmers with the goal of preparing for interviews, and we might as well go where most of them are.

  • It supports regular practice: The way to get better at coding interview problems is to write code and see how it performs on tests. This matches the core LeetCode practice loop: Read a problem, design and implement a solution, run it on test data, and try again (or move on to the next problem).

The tips we’ll be covering this year promote two goals: 1) Practicing coding interview problems, and 2) Understanding the solutions to these problems. LeetCode has a similar structure. The online judge supports practice. And to help with understanding the solution, each problem gets a throughout analysis by LeetCode in the official solution and by community members in the discussion forums.

A Project for 2023

By Duncan Smith Leave a Comment Jan 4 0

2023

While working on my LeetCode project last year, I started a list of general practice notes. Not notes on specific problems, though those are essential, but notes on the LeetCode practice process in general. My plan for this year is to turn those into a short LeetCode practice tip each week.

« Continue »

2022 in Review: Content Bots

By Duncan Smith Leave a Comment Dec 28 0

Cyberpunk programmer

Quora relies on machine learning. No surprise there. Any major service that accepts user-generated content needs more than human moderation to keep up with the influx of submissions. Algorithms help filter out bad content and promote good content (or at least content that increases user engagement). But this year seems to be an inflection point for algorithms that not only moderate content, but also create it.

« Continue »

Quora: How Can an Interviewer Effectively Evaluate Multiple Ways of Solving a Coding Problem?

By Duncan Smith Leave a Comment Dec 21 0

Red-Green-Code Quora 2022

A good question for interviewers to think about:

As a software engineering interviewer, how can you avoid getting into a mindset that your own method for solving a coding challenge is the best way to solve it, and reject any other implementation? (answer)

See A Project for 2022 to find out what I’m working on this year.

Quora: Is Stack Overflow Giving ChatGPT Too Much Attention?

By Duncan Smith Leave a Comment Dec 14 0

Red-Green-Code Quora 2022

Everyone is talking about ChatGPT this week.

Isn’t Stack Overflow advertising ChatGPT when it bans it and then makes numerous posts about why it banned it? (answer)

See A Project for 2022 to find out what I’m working on this year.

Quora: Do Interviewers Look Up Solutions to the Coding Questions They Ask?

By Duncan Smith Leave a Comment Dec 7 0

Red-Green-Code Quora 2022

This question is about preparing to conduct an interview, rather than preparing to be interviewed.

Do software engineers in FAANG and similar tech companies who ask coding challenges in interviews sometimes look up the solution before they ask the questions in an interview? (answer)

See A Project for 2022 to find out what I’m working on this year.

Quora: How Can One Become an Expert in Competitive Coding?

By Duncan Smith Leave a Comment Nov 30 0

Red-Green-Code Quora 2022

Quora is moving away from the concept of a “canonical question,” in which similar questions are merged into one. So popular questions like this can one can now be asked and answered as often as we want and will be displayed together as “related questions.”

How can one become an expert in competitive coding (like Google Code Jam)? (answer)

See A Project for 2022 to find out what I’m working on this year.

Quora: Should I Start by Learning Algorithms, or Start by Solving Problems?

By Duncan Smith Leave a Comment Nov 23 0

Red-Green-Code Quora 2022

Learn first, or practice first?

Should I start learning DSA for CP or practice random topics first (My CF rating is only 800)? (answer)

See A Project for 2022 to find out what I’m working on this year.

Quora: Is It True That LeetCode Questions With a Lot of Downvotes Are Not Worth Solving?

By Duncan Smith Leave a Comment Nov 16 0

Red-Green-Code Quora 2022

Crowdsourcing LeetCode question quality.

Is it true that LeetCode questions with a lot of downvotes are not worth solving? (answer)

See A Project for 2022 to find out what I’m working on this year.

  • « Previous Page
  • 1
  • …
  • 6
  • 7
  • 8
  • 9
  • 10
  • …
  • 49
  • 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