Flexible Finance interview question

Asking both leetcode style question and system design question