Warren Buffett’s Berkshire Hathaway Inc. acquired 17.9 million shares of Google parent Alphabet Inc. during the third quarter, while further trimming its holdings in Bank of America Corp. and Apple Inc.