← TCS questions
CodingReported in a candidate post, Jul 2019

Factorial of a number

Filed under TCS · Also reported at Accenture, Adobe, Chai Point, Citi, Cognizant, GE Healthcare, Hexaware, Publicis Sapient and 1 more

Calculate the factorial of a non-negative integer n, defined as n! = n * (n-1) * ... * 1, with 0! = 1.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related TCS questions

Collected from public candidate posts and coding forums. Updated Nov 2026.