Top Coding Interview Question – Solved

3 Live
Software developers at Amazon are developing a new library for Natural Language Processing. In one of its modules, every string needs to be preprocessed in a particular manner to find the length of its longest self-sufficient proper substring A self-sufficient proper substring is one where 1. the substring is not the entire string s 2.no letter that occurs inside the substring also occurs outside the substring Given the string fullString of length n, find the length of its longest self-sufficient proper substring. If none exists, return 0. Example fullString = "amazonservices" Here The length fullString, n = 14.

Asked in: No companies listed

Image of the Question

Question Image Question Image

All Testcases Passed βœ”



Passcode Image

Solution


Please login to view the solution


Related Questions

| Given an n x m grid, where rows are numbered from 7 to n and columns from 1 to … |
| There are 'N' coders standing in a line, where i denotes the ith position of a … |
| A birthday party was attended by N number of kids, and each kid was given a uni… |
| Given a matrix of size m * n, where m denotes the number of rows (starting with… |
| A traveler is traveling from the city of Zeta to Omega. He starts with X amount… |
| As an operations engineer at Amazon, you are responsible for organizing the dis… |