It depends really, the sprinting option would certainly work to improve you're leg strength to a higher level as far as I know. Longer, less intense cardio workouts (like longer jogging trips) burn more calories than shorter, more intense sessions, but I'm not sure whats better for building stamina. Keep in mind that walking or running down steep mountains/hills can damage the knees.
Personally I'd have to say that a mix of the two would be good. I.e, one week sprinting up and down it, next week doing it once as part of a longer run. Do keep the knee thing in mind though.
I hope this helps, I'm no expert so don't take my word for it.
