Stokastik

Machine Learning, AI and Programming

Tag: Longest Duplicate Substring

Leetcode : Longest Duplicate Substring

Problem Statement Solution: The brute force approach for this problem would be to scan for all substrings of length L for each possible value of L from 1 to N-1. Store the substrings in a set() and whenever we encounter a substring which is already present in the set then it is a duplicated substring of length L. Repeat this for all L until we find some L' for which […]

Continue Reading →