அல்கோரிதம்greedy check
Greedy check
TT
Testlaa Team
May 14, 2026•1 min read
Candidate — linear validate.
Try this in Python
def valid(order, deadlines):
t = 0
for job, d in zip(order, deadlines):
t += job
if t > d:
return False
return True
print(valid([2, 1], [3, 3]))
Key takeaways
- Validate early.
- Stress test.
- Split construct/check.
Tags:
GreedyPythonமாணவர்கள்
