Rippling interview question

Rule Engine from past leet code