Find the Duplicates

You’ll find multiple reasons to remove duplicates from a series of random numbers. The main reason is that the process or generating random numbers is capable of yielding duplicate values. But more importantly, if your list represents discrete items in the real world, such as playing cards, you can’t really have a duplicate value pop up.
Continue reading

Shuffle That Playlist

Recently, I created a playlist of songs on a certain online subscription service. I chose to shuffle the tunes, but found that one song in particular played more often than the others. My immediate thought was, “Why can’t the programmers design a shuffled playlist that doesn’t overplay the same song”? Rather than email the programmers, I thought I’d present the puzzle as this month’s Exercise.
Continue reading

Duplicated Letters

I’ve been working on a program that counts unique words in a text file. It’s an interesting exercise and explores the larger realm of pattern matching. You can try such scanning on a smaller scale by coding a program that counts the frequency of letters within a string. And that task is presented as this month’s Exercise.
Continue reading

Fill My Grid

I’m fascinated by grids. Consider the chessboard, which is a grid. Or think about the most basic game grid, a 3-by-3 array for a game of tic-tac-toe. Programming a grid is a common thing, so your best hope is that this month’s Exercise is yet another super cinchy silly grid program.
Continue reading