Red-Green-Code

Deliberate practice techniques for software developers

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

Archives for January 2020

Quora: Java vs. C++ in Competitive Programming

By Duncan Smith Leave a Comment Jan 29 0

Red-Green-Code Quora 2020

Two top competitive programmers who used to submit their solutions in Java have recently made the switch to C++. But how did they do so well with Java in the first place?

How has Petr Mitrichev won so many competitive programming contests by using Java and not C++? (answer)

I’m doing most of my writing on Quora this year. For more information, see A Project for 2020.

Quora: Do Companies Want Competitive Programmers?

By Duncan Smith Leave a Comment Jan 22 0

Red-Green-Code Quora 2020

Companies aren’t looking for competitive programmers. But because of how interviews work, it can seem like they are. So Quora ends up with some odd questions:

Do I need to be a competitive programmer to work at one of the top tech companies? (answer)

I’m doing most of my writing on Quora this year. For more information, see A Project for 2020.

Quora: Memorizing the Answers

By Duncan Smith Leave a Comment Jan 15 0

Red-Green-Code Quora 2020

A popular criticism of coding interviews is that candidates can cheat by looking up common questions and memorizing the answers. I don’t know if anyone has succeeded using that approach, but it doesn’t seem to me like it would work.

Is it possible to memorise the tricks of algorithm questions to crack the Google interview? (answer)

I’m doing most of my writing on Quora this year. For more information, see A Project for 2020.

Quora: Optimizing Competitive Programming Solutions

By Duncan Smith Leave a Comment Jan 8 0

Red-Green-Code Quora 2020

Long ago, I wrote an article about Profiling Java Programs with VisualVM. It can be interesting to analyze code to find performance bottlenecks. But for competitive programming solutions, it’s usually a losing battle. If you choose the wrong algorithm, no amount of micro-optimization will help.

What are ways to optimize programs? My algorithms are strong enough but I am having serious difficulties in optimizations. I wonder how people in Online Judges think so creatively. (answer)

I’m doing most of my writing on Quora this year. For more information, see A Project for 2020.

A Project for 2020

By Duncan Smith Leave a Comment Jan 1 0

Ada

People often use the term competitive programming to refer to any activity (besides homework) where programmers create solutions to made-up puzzles rather than real-world problems. For example, consider this Quora question: Which is the best online judge for competitive programming, HackerRank, HackerEarth or LeetCode? As Bohdan Pryshchenko points out in his answer, these three sites focus on interview practice, not competitive programming in the traditional sense. Their questions cover topics likely to come up in an interview. And although some of them host contests, those contests don’t consistently attract the strong contestants who regularly show up for Codeforces and Topcoder events.

When I’m writing Quora answers, I sometimes point out the difference between competitive programming and interview preparation if it’s relevant to the question. But while I’m always in favor of using terms correctly, I’m not sure how important this distinction is in the scheme of things. Consider that:

  • Coding interview questions require knowledge of topics like graphs, trees, and dynamic programming algorithms, all of which are used in competitive programming.

  • Participation in competitive programming tapers off quickly as the problems require more advanced algorithms. For example, see the bottom graph in this Quora answer. Red coders on Topcoder are a long tail at the high end of the rating distribution, while the bulk of the contestants are clustered in the large gray-green-blue area. At these levels, competitive programming questions use well-known algorithms, just like interview questions do.

  • Competitive programming owes most of its popularity to its association with coding interviews. If it was just about coders solving puzzles, it would be a niche activity even within the software engineering world.

« Continue »

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:

  • 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

  • LeetCode 1022: Sum of Root To Leaf Binary Numbers January 27, 2021
  • LeetCode 1288: Remove Covered Intervals January 20, 2021
  • LeetCode 227: Basic Calculator II January 13, 2021
  • A Project for 2021 January 6, 2021
  • Lessons from the 2020 LeetCode Monthly Challenges December 30, 2020
  • Quora: Are Math Courses Useful for Competitive Programming? December 23, 2020
  • Quora: Are Take-Home Assignments a Good Interview Technique? December 17, 2020
  • Quora: Why Don’t Coding Interviews Test Job Skills? December 9, 2020
  • Quora: How Much Time Should it Take to Solve a LeetCode Hard Problem? December 2, 2020
  • Quora: Quantity vs. Quality on LeetCode November 25, 2020
Red-Green-Code
  • Home
  • About
  • Contact
  • Project 462
  • CP FAQ
  • Newsletter
Copyright © 2021 Duncan Smith