Twitter: raymondcamden


Address: Lafayette, LA, USA

Friday Puzzle - Welcome to Santa's IT Department

12-01-2006 5,259 views ColdFusion

For today's puzzler you find yourself newly employed in Santa's Workshop. While Santa is quite magical, full of joy, blah blah blah, his IT skills leave a bit to be desired. In fact, his current IT department currently consists of one elf who wants to be a dentist and some large furry creature.

Your first task is simple. Santa maintains a list of kids who are naughty and nice. He used to keep this list on a scroll of parchment but after recently upgrading to Windows 95 (hey, he takes his time with changes!) Santa began using Notepad.

Unfortunately - Notepad isn't a very nice database and this has led to some problems. Duplicate names and kids on two lists.

Write a simple function to read in two text files (good.txt and naughty.txt). Compare the files and remove any child on both lists and add them to a new file, tobedecided.txt. Also remove any child who appears more than once in a list.

Good luck - Santa is counting on you!