**Problem Statement:**
Given the required input arguments, write an efficient algorithm to solve the **Task Assignment (Interval Scheduling)** problem. Implement the required logic as specified by standard definitions for this classic algorithmic challenge.
**Hint / Expected Approach:**
Sort tasks + sort machines; greedy assign
**Edge Cases to Consider:**
- (1) Single machine
- (2) All tasks same duration
- (3) More machines than tasks