greedy approach for job scheduling usin stack and sorting on earliest time

hey guys i know greedy approach work on finish time sorting but i have an solution that works using
start time sorting and stack.
but the problem is it is only works for spoj problem and on many hackerearth problems eg.

also works for this one CodeChef: Practical coding for everyone

but the same solution not works for this problem:

if you have any testcase on which it fails would be appreciated.