I should add: If you head in from Horseshoe Meadows or Onion Valley/Kearsarge Pass, you CAN exit on the Whitney trail, if you also get a Trailcrest Exit permit. The quota for those is 25 per day, with 60% (15) reservable 6 months in advance, and the other 10 available to walk-in requests (when you go in and pick up the permit to enter whichever point you start). The rangers may give you a little wiggle room if you can't exit on the exact date on the exit permit if you are faster or slower than planned.

So going that route, you don't NEED to return to the same trail you entered. But then you have to get back to your car at the trailhead via hitch hiking or other means.

I did the Onion Valley trip with this schedule:
night 1 at Onion Valley parking lot.
night 2 at Center Basin junction (just before Forrester Pass)
night 3 at Wallace Creek (had pretty bad AMS)
night 4 on Whitney summit. (AMS gone)
So it was 3 1/2 days of hiking. We had four hikers on that trip.