Substring of a String
A substring is a contiguous part of a string, i.e., a string inside another string.
In general, for a string of size n, there are n*(n+1)/2 non-empty substrings.
For example, Consider the string “geeks”, There are 15 non-empty substrings.
The subarrays are:
g, ge, gee, geek, geeks,
e, ee, eek, eeks,
e, ek, eks,
k, ks,
ks
Contact Us