Investigate the various bus options at yarts.com,
http://www.yosemitepark.com/public-transportation.aspx and the nps.gov/yose page. Between free shuttles, YARTS routes and the tour and hiker busses, Yosemite is the easiest park to navigate.
bus and walk, bus and bike, bus and hitchhike, you can get there. YARTS will happily pick you up and drop you off along their routes - I've gotten back to Tuolumne Meadows from Mammoth Lakes that way.