Intuit Interview Question

1. Simple algo 2. Simple algo 3. Pattern matching