Question: Write a function contains _ permutation that takes two inputs: input _ string : a string pattern: a string and returns True if input _
Write a function containspermutation that takes two inputs:
inputstring : a string pattern: a string
and returns True if inputstring contains a substring group of consequtive characters that is a permutation of pattern and False otherwise. Your function must have a running time complexity of On where n is the length of inputstring.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
