Stocks gained on Tuesday as investors bought shares beaten down in recent weeks, betting European leaders would do something soon to stem the Greek debt crisis.

The Dow Jones industrial average <.DJI> gained 44.35 points, or 0.40 percent, to 11,105.47, according to the latest available figures. The Standard & Poor's 500 Index <.SPX> gained 10.58 points, or 0.91 percent, to 1,172.85. The Nasdaq Composite Index <.IXIC> gained 37.06 points, or 1.49 percent, to 2,532.15.

(Editing by Kenneth Barry)