Challenge July-2025

Rules with Regular Expressions                                                                                 Solutions

UniversityCourses

A university is developing a system that helps a student select certain courses to receive a desired degree. Each course has a unique code, such as “MA523” or “CS38251”. Help a university create a simple decision service that evaluates a set of all courses to split it into two lists of allowed and not allowed courses, following these rules:

RULE 1. If the Degree Code is “MA Single” and the Course Code is similar to MA52# or MA62#, where # stands for any single character, add this course to the list of allowed courses.

RULE 2. If the Degree Code is not “CS%” and the Course Code is similar to CS%288% or CS%289%, where % stands for any combination of characters, add this course to the list of not allowed courses.

Send your solutions to DecisionManagementCommunity@gmail.com.

Solutions: