Wipro Interview Question

They asked me questions based on combinatorics.