> Markdown version of [/magazine/492-code100-challenge-the-license-plate-challenge-solution-and-winners](https://www.wearedevelopers.com/magazine/492-code100-challenge-the-license-plate-challenge-solution-and-winners). Every page supports `.md` or `Accept: text/markdown`. Links point to the HTML versions so they work for humans too. Agent guide: [/agents.md](https://www.wearedevelopers.com/agents.md). --- # CODE100 Challenge - 'The License Plate' Challenge Solution and Winners **By:** [Daniel Cranney](https://www.wearedevelopers.com/@daniel-cranney) **Published:** November 1, 2024 As you've probably seen, we've been releasing a new CODE100 challenge as part of each of our WeAreDevelopers LIVE days! At our recent .NET day, we gave you a chance to win a ticket to the World Congress in 2025, challenging you to work with some license plate data and analyse it with code. ## The Challenge This time, we gave you two data sets to work with: a CSV file listing valid German license plate prefixes, city/area names, and their states, and a JSON array with 2000 license plates. ‍ The challenge tasked you with processing these datasets to find the number of invalid licenses, licenses from Bavaria, and electric vehicle licenses. By validating the license plates to check they follow the correct formatting structure, your code would return totals for invalid, Bavarian, and electric vehicle licenses. ## **A Solution** Of course, there are many ways you could solve this, but here's one way you might have tackled it. https://www.youtube.com/embed/Gf1SFP7k3gQ ‍ 1. Begin by cleaning up the data, handling exceptions like poorly-formatted plates. 2. Split the comma-separated values at the line breaks, converting the content into arrays, and use the shift() method to remove the headers (such as "License Name") as they will also be included in the conversion process. 3. Create two arrays, for valid cities and Bavarian cities. 4. Using a forEach loop, iterate over the lines of data, cleaning it up along the way (removing the quote marks and additional parentheses within it), adding the lines to the valid licenses array. 5. Check if the city is equal to Bayern, and if so, add this plate to the array containing the Bavarian cities. 6. Now that our data has been cleaned up, we can organise it within a result object, using the length method to check out how many items feature in each array. 7. When iterating over the cleaned up list of licenses, licenses are sorted into the electric category by checking if the license ends with 'E'. 8. Finally, we collect together our arrays in our result object, returning an object containing invalidLicenses, bavarianLicenses, electricLicenses, all as numbers. We had quite a few submissions and a Math.random() on them all came up with two winners who will move on to the CODE100 final in Berlin in July 2025 at the WeAreDevelopers World Congress! These are: **Jack Barber** and **Jordi Busquets!** See you next time! ## Related Articles - [CODE100 LIVE Day Challenge - "The Lunchbox Challenge" solution and winners](https://www.wearedevelopers.com/magazine/484-code100-live-day-challenge-the-lunchbox-challenge-solution-and-winners) - [CODE100 Live Day challenge -"Scavenger Hunt" solution and winners](https://www.wearedevelopers.com/magazine/479-code100-live-day-challenge-scavenger-hunt-solution-and-winners) - [CODE100 - Could you have solved our coding challenges?](https://www.wearedevelopers.com/magazine/281-code100-could-you-have-solved-our-coding-challenges) - [Dev Digest 111 - npm i -g issues](https://www.wearedevelopers.com/magazine/415-dev-digest-111-npm-i-g-issues) ## Related Videos - [WeAreDevelopers LIVE - CODE100 at WeAreDevelopers Europe](https://www.wearedevelopers.com/videos/2132-wearedevelopers-live-code100-at-wearedevelopers-europe) - [WeAreDevelopers LIVE - Our World Congress 2025 & CODE100 Highlights with Jack Barber and Marco Podien](https://www.wearedevelopers.com/videos/1362-wearedevelopers-live-our-world-congress-2025-code100-highlights-with-jack-barber-and-marco-podien) - [WeAreDevelopers LIVE - Back to CODE100](https://www.wearedevelopers.com/videos/1909-wearedevelopers-live-back-to-code100) - [Coffee with Developers - CODE100 Manchester challenger Gbenga Oladipupo](https://www.wearedevelopers.com/videos/894-coffee-with-developers-code100-manchester-challenger-gbenga-oladipupo) ## Related Jobs - [Machine Learning Engineer](https://www.wearedevelopers.com/jobs/ext/1377841-machine-learning-engineer) at **Almedia** - [Software Engineer Public Sector (all genders)](https://www.wearedevelopers.com/jobs/48214-software-engineer-public-sector-all-genders) at **msg** - [Software Tester (f/m/d)](https://www.wearedevelopers.com/jobs/44712-software-tester-f-m-d) at **Power Plus Communications** - [Machine Learning Engineer](https://www.wearedevelopers.com/jobs/ext/1597388-machine-learning-engineer) at **ZEISS Group** - [Senior Backend Engineer (Java)](https://www.wearedevelopers.com/jobs/ext/19369-senior-backend-engineer-java) at **Bonial International GmbH** - [Cloud Data Engineer (all genders)](https://www.wearedevelopers.com/jobs/48216-cloud-data-engineer-all-genders) at **msg**