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 […]
ContinueSolving UVa 11085 with Recursive Backtracking
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.
ContinueWhen Not to Simulate a Game (UVa 11553)
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 […]
ContinueCommand-Line Tools for Competitive Programming
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 […]
ContinueEquation Solving is the Key to UVa 11236
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 […]
ContinueA Git Workflow for Programming Puzzles
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 […]
ContinueBook Review: Deep Work by Cal Newport
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 […]
ContinueCombinations and Permutations for UVa 735
Combinations and permutations are worth learning about for programming puzzles, and for programming in general. UVa 735: Dart-a-Mania provides a basic introduction.
ContinueRed-Green-Code: 2015 in Review
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.
ContinueMath Fluency for UVa 927
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 »