| collatz | ||
| roman | ||
| stack | ||
| .gitignore | ||
| README.md | ||
| requirements.txt | ||
Turner & Townsend backend technical assessment
This repository contains my solutions to the Turner & Townsend backend technical assessment. While the brief requested solving only one problem, I started with the "spiciest" Stack task for the first hour and then tackled the other two tasks in the second hour. I did come back the next day and spend some extra time improving the README documentation.
Solutions
Stack Calculator
Complexity: Medium
A stack-based programming language interpreter (Fifth) that supports arithmetic operations and stack manipulation commands. Features an interactive REPL with comprehensive error handling.
Roman Numerals Converter
Complexity: Medium
Converts Roman numerals to Arabic numbers using additive logic. Includes flexible input handling with case-insensitive processing and automatic filtering of invalid characters.
Collatz Conjecture Calculator
Complexity: Low
Calculates the number of steps in the Collatz sequence (3n + 1 problem) with step-by-step visualization. Demonstrates mathematical algorithm implementation with interactive feedback.
Architecture
All three solutions follow consistent design principles:
- Class-based structure for encapsulation and testability
- Interactive command-line interfaces with graceful error handling
- Comprehensive test suites with good coverage
- Modern Python features and best practices
Quick Start
Requirements: Python 3.10+, pytest
# Install dependencies
pip install -r requirements.txt
# Run solutions
cd stack && python stack.py
cd roman && python roman.py
cd collatz && python collatz.py
# Run tests
pytest # All tests
pytest stack/ # Individual solution tests
Click the links above to view detailed documentation for each solution.