Stalling

Have a 2005 Kia Optima. Several times in the past week it has stalled on me after running, on freeway and city streets. After about 10 minutes or so I was able to start it up again. Midas mechanics could not find out the problem. Any suggestions?

When it quits does the engine stutter and stumble to a stop or does it shut down like you turn a light off?

I have a similar problem with my 2001 Dodge Neon, stalls once a night during my 300 mile delivery route, engine just quits “like shutting off a light” only when in gear and stopped like at a traffic signal, it does start right up again. Before this started happening the engine would “surge” at a traffic signal. Pep Boys said the pcm needed reprogrammed, my local Dodge dealer says this has already been done and they cannot do it again, even though I have had the car since new and have never had anything like this done to it. Dodge dealer says nothing is wrong with the car, as far as they can tell.