Sensex ends 182 points higher; midcaps outperform, Nifty Bank slips