A mature student whose education was disrupted by family tragedy has graduated from Swansea University with First-class honours in Mathematics and Computer Science, earning a place at the University of Oxford.