I'm a little confused about calculating the maximum efficiency of an engine cycle. From what I've learned the carnot cycle is connected by two adiabatic processes and two isothermal, and this is the most efficient engine cycle.
But on a recent homework assignment I was given an engine cycle that had two isothermal processes and two isobaric. I calculated the efficiency using the total amount of work, divided by the heat going into the engine:
$eff={|W_{total}|\over |Q_{in}|}$
And then I was instructed to find the maximum efficiency, I didn't know how to do this so a friend of mine told me to calculate it using the equation for the efficiency of a carnot cycle in terms of temperature:
$eff = 1 - {T_c\over T_h}$
This turned out to be the correct answer according to my professor, but I still don't understand why this gives the maximum efficiency. Why is this the case? Why can this be used to find the maximum when the original cycle didn't have any adiabatic processes?