Message on Whatsapp 8879355057 for DSA(OA + Interview) + Fullstack Dev Training + 1-1 Personalized Mentoring to get 10+LPA Job
0 like 0 dislike
1,744 views
in Online Assessments by Expert (111,530 points) | 1,744 views

2 Answers

0 like 0 dislike
Best answer

Description: Given a String s, a sub-string is defined as a non-empty string that can be obtained by applying following operation

 

  1. Remove zero or 1 character from left side of s
  2. Remove zero or 1 character from right side of s
  3. Remove zero or 1 character from left & right side of s
    Find how many distinct sub-string possible.

 

Characters in string are [a-z]
String length can be up to 10^5

 


 

image

 

by Expert (111,530 points)
0 like 0 dislike
is there better than trie solution?
by (140 points)

Get best answers to any doubt/query/question related to programming , jobs, gate, internships and tech-companies. Feel free to ask a question and you will receive the best advice/suggestion related to anything you ask about software-engineering , development and programming problems .