Programming puzzles frequently involve manipulation of integers. And even problems that are mainly about string manipulation, character sets, or floating point arithmetic need integers for array indexes and counters. So it pays to know how to use them. In this article, I’m going to cover some of the quirks of integers and longs as implemented […]
ContinueResults Not Guaranteed
In 2013, I took an experimental course on deliberate practice that Cal Newport and Scott Young were developing. In the email announcing the course, Cal warned: “If … you’re expecting guaranteed results, this pilot might not be a good fit.” It’s a standard marketing technique for products and services to promise guaranteed results. But that’s […]
ContinueIs There No Map?
In Linchpin, Seth Godin has this to say about giving advice: Telling people leadership is important is one thing. Showing them step by step precisely how to be a leader is impossible. “Tell me what to do” is a nonsensical statement in this context. There is no map. No map to be a leader, no […]
ContinueWhat is competitive programming?
What is competitive programming? Here are a few definitions. From Wikipedia: Competitive programming is a mind sport usually held over the Internet or a local network, involving participants trying to program according to provided specifications. … A programming competition generally involves the host presenting a set of logical or mathematical problems to the contestants … […]
ContinueStack Overflow vs. Competitive Programming Questions
I like to keep an eye on what people are saying about competitive programming, so I subscribe to a Google Alert for that phrase. Almost every day, I get a few results. While programmers are opinionated about a lot of things, this topic seems to bring out especially strong opinions. Here are some places where […]
ContinueGetting Started With UVa Online Judge: The 3n+1 Problem
If you’re interested in competitive programming, or you just like solving programming puzzles, UVa Online Judge is not a bad place to start. During the many years that it has been active, people have written books, supporting web sites, and sample code to help programmers get more out of it. As my contribution to the […]
ContinueSolving UVa 978 With Unit Tests
Last week, I wrote about how unit testing can improve your competitive programming practice. As promised, this week I’m going to go through an example of the unit testing process. For an example problem, I’ll be using UVa 978: Lemmings Battle! See above for a picture of a ferocious lemming. Problem Summary Lemmings Battle! is […]
ContinueUnit Testing Your Competitive Programming Solutions
A couple of months ago, I wrote an article about a type of unit test called a learning test. The goal of learning tests is improving your understanding of how code works, rather than verifying functionality or influencing design, the traditional goals of unit testing. This week, I’m going to discuss those traditional goals of […]
ContinueUVa 11572: Unique Snowflakes
UVa 11572 contains a story about a magic snowflake-capturing machine, but the underlying puzzle can be stated quite simply: Given a sequence of integers, find the length of the longest contiguous subsequence containing no repeated elements. The sequence given in the sample input is: 1, 2, 3, 2, 1 The subsequence 1, 2, 3, 2 […]
ContinueSummer Review
It’s summertime here in the Pacific Northwest, and seven months into the first year of this blog. After thirty weekly posts, I thought it would be a good time to consider the themes that have come up so far this year. If you’re a new reader, I hope you’ll find this to be a useful […]
Continue- « Previous Page
- 1
- …
- 44
- 45
- 46
- 47
- 48
- 49
- Next Page »