Texas Tech rallies to beat Minnesota 34-31