SAP Interview Question

Code refactorings and factorial optimization