Is there any constraint on the input for using only lowercase characters for inputted string and pattern? If there is, we can use arrays of 26 characters to keep track of the frequency of both the inputted string and the pattern.
Type your question above this line.
Course: https://www.educative.io/collection/5668639101419520/5671464854355968
Lesson: https://www.educative.io/collection/page/5668639101419520/5671464854355968/4679331609575424