How to find the minimum range including all characters of a string?

Revision en1, by rezzaque, 2017-03-27 11:34:13

Given a string s with size n, how do I find the minimun range (p,q) such that all the characters in s occur in that range. Looking for an O(n) solution.

Tags divide and conquer, #strings

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English rezzaque 2017-03-27 11:34:13 221 Initial revision (published)