A database has been dumped out to a text file. The task is to process this text file to find some useful information.
The file contains a dump of a database. Each line consists of the name of the field from the database (“name: “, “age: ” for example) followed by the value. Blank lines are used to separate records. One of the fields in the database represented a person’s favourite colour. The names of the colours were taken from the standard list of HTML and CSS colours.
The task is to process the file to find the most popular colour in the database.
(Originally found on Programming Praxis.)
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.