Red-Green-Code

Deliberate practice techniques for software developers

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

More Recursive Backtracking (UVa 574)

By Duncan Smith Leave a Comment Feb 24 0

Last week I wrote about solving UVa 11085 using the recursive backtracking search technique. This week, I’m going to outline a more general approach to recursive backtracking problems. Then I’ll show how it can be adapted to solve UVa 574. UVa 574 asks us to solve this problem: Given a multiset $S$ of integers and […]

Continue

Solving UVa 11085 with Recursive Backtracking

By Duncan Smith Leave a Comment Feb 17 1

The uHunt Chapter 1 starred problems contain three examples of chess problems. In Chapter 3, we get back to chess with a variation on the classic eight queens puzzle. UVa 11085 is used to illustrate the algorithmic technique known as recursive backtracking.

Continue

When Not to Simulate a Game (UVa 11553)

By Duncan Smith Leave a Comment Feb 10 0

Some programming puzzles can be solved by simulating a game or process. For example: UVa 978 is based on simulating a conflict between warring lemmings. For UVa 732, you have to simulate something more abstract: a stack that pushes and pops characters. UVa 11553 may seem like a classic simulation problem: a board game between […]

Continue

Command-Line Tools for Competitive Programming

By Duncan Smith Leave a Comment Feb 3 4

When they select their tools, programmers have a choice between command-line and GUI options. Most people use both. For example, I prefer to use GUI tools for diffing a set of files I’m preparing to commit to a source repository. I also like my editor to be graphical, though I use a lot of keyboard […]

Continue

Equation Solving is the Key to UVa 11236

By Duncan Smith Leave a Comment Jan 27 0

UVa 11236: Grocery Store is an unusual problem for UVa Online Judge: it takes no input! There’s just a problem statement explaining the rules for finding the output. The lack of input and the mathematical nature of the problem reminds me of the problems on Project Euler. And as with Project Euler, you could cheat […]

Continue

A Git Workflow for Programming Puzzles

By Duncan Smith Leave a Comment Jan 20 4

If you practice programming puzzles regularly, you probably keep an archive of your solutions. This can be useful for reference when you encounter similar problems. And even if you never look at some of them again, disk space is cheap and source code is small, so why not? The simplest way to save your solutions […]

Continue

Book Review: Deep Work by Cal Newport

By Duncan Smith Leave a Comment Jan 13 0

For many years, Cal Newport has been writing about ways to get better at doing difficult things. His first three books were manuals for students, advice on learning techniques and where to focus one’s efforts during high school and college. In 2012, he wrote So Good They Can’t Ignore You, about building career capital by […]

Continue

Combinations and Permutations for UVa 735

By Duncan Smith Leave a Comment Jan 6 1

Combinations and permutations are worth learning about for programming puzzles, and for programming in general. UVa 735: Dart-a-Mania provides a basic introduction.

Continue

Red-Green-Code: 2015 in Review

By Duncan Smith Leave a Comment Dec 30 3

One year ago, I started writing here on the topic of deliberate practice techniques for software developers. This is my 52nd weekly post for 2015. With the year coming to an end, let’s review the story so far.

Continue

Math Fluency for UVa 927

By Duncan Smith Leave a Comment Dec 23 0

From time to time, I’ll run across a UVa problem description that makes liberal use of mathematical notation. UVa 927, the first starred problem in uHunt Chapter 3, is one of those. uHunt classifies it as a Level 4 problem, but most of the challenge is in interpreting the problem description. Once you figure out […]

Continue
  • « Previous Page
  • 1
  • …
  • 42
  • 43
  • 44
  • 45
  • 46
  • …
  • 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