Algerian state TV said that firefighters have controlled huge blazes that killed 34 people in the North African country amid a searing heatwave.