Asian shares mostly gained on Tuesday, with markets in South Korea and Japan trading higher after recent declines due to heavy selling of stocks linked to artificial intelligence.…