Apple overtook Nvidia on Friday to become the world’s most valuable company. This reshuffled the top ranks of tech heavyweights as investors reassess the outlook for artificial intelligence.

The iPhone maker is once again the world’s largest company by market value.

If Apple overtakes Nvidia, it would reclaim the top spot for the first time since April last year. The close race shows that investors are broadening their focus beyond the…