Driver program to test above function
public static void Main ( String [ ] args ) { String str = " ababa " ; Console . WriteLine ( " Count ▁ of ▁ distinct ▁ substrings ▁ is ▁ " + countDistinctSubstring ( str ) ) ; } }