Why do we need to parse S1 in reverse to get the length when we have found all characters of the S2?
We could have also stored the index when first matching character was found and subtract it from the index of last matching character.
Also, the console output does not always show when I try my code. For this question, when my code passed all the tests, it did not show the console output. Can you make sure the console output always shows?
Course: Grokking Coding Interview Patterns in Java - Learn Interactively
Lesson: Solution: Minimum Window Subsequence - Grokking Coding Interview Patterns in Java
Course: Grokking Coding Interview Patterns in Java - Learn Interactively
Lesson: Solution: Minimum Window Subsequence - Grokking Coding Interview Patterns in Java