Need Help solve this problem

Revision en1, by jarvis_yash, 2023-11-07 16:01:38

given string which only contains 'J' , 'L' , 'R' as character

find smallest substring of size >=2 which follows following condition no.of J is strictly greater than L no.of J is strickly greater than R

2<= N: length of string <=1e6

Tags #strings, substring

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English jarvis_yash 2023-11-07 16:01:38 267 Initial revision (published)