There are N students in a class. Recently, an exam on Advanced Algorithms was conducted with maximum score M and minimum score 0. The average score of the class was found out to be exactly X.
Given t…
Given a string S of length N containing only numeric characters, find the number of Nice Pairs.
A Nice Pair is a pair of indices - (i, j) such that 1≤i