NVIDIA Interview Question

How to compute n factorial. How can you design a ML system for segmentation