Implement staircase printing and distributed mode/median | Anthropic Interview Question