Split the String You are given a string ‘str’ of ‘N’ lowercase alphabets. Your task is to check whether it is possible to split the given string into three non-empty substrings such that one of them is a substring of another two. For example: ‘str’ = 'abcabab', we can split this string into 3 string a, b, c as ...

read more
CodingNinjas
author
2y
Brute-forceThe idea here is to check all possible ways to divide a string into 3 substrings and check if there is a string that is a substring of the other two parts. We can divide a string into 3 non...
see more
CodingNinjas
author
2y
GreedyThe idea here is to work with a little bit of intuition. We discussed partitioning of string into 3 parts such as prefix+middle part+suffix.  Can we fix the length of the middle string to 1...
see more
Aamir Iqbal
10mo
works at

THis is my answers. Jhwoef hoh fewiudcb ifvbd iubd wisajbufj

Add answer anonymously...
Infosys Software Engineer Interview Questions
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+

Reviews

4 L+

Interviews

4 Cr+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2023 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter