How many substrings of different lengths (non-zero) can be formed from a…

PYQ GATE 1998

How many substrings of different lengths (non-zero) can be formed from a character string of length n?

  1. A.

    n

  2. B.

    n^2

  3. C.

    2^n

  4. D.

    n(n+1)/2

Attempted by 311 students.

Sign up free to check your answer

Sign up free

Explore the full course: Zero To Hero

Loading lesson…