The tech giant finished as the largest U.S. company by market cap for the first time in months on Tuesday.