the hash 0indexed string s length k give integer p m compute follow functionhashs p m vals0 p0 vals1 p1 valsk1 pk1 mod mWhere valsi represent index si alphabet vala 1 valz 26you give string s integer power modulo k hashValue Return sub substre s length k hashsub power modulo hashValueThe test case generate answer existsA substre contiguous nonempty sequence character string Example 1input s leetcode power 7 modulo 20 k 2 hashValue 0output eeexplanation the hash ee compute hashee 7 20 5 1 5 7 mod 20 40 mod 20 0 ee substre length 2 hashvalue 0 hence return eeexample 2Input s fbxzaad power 31 modulo 100 k 3 hashvalue 32output fbxexplanation the hash fbx compute hashfbx 31 100 6 1 2 31 24 312 mod 100 23132 mod 100 32 the hash bxz compute hashbxz 31 100 2 1 24 31 26 312 mod 100 25732 mod 100 32 fbx substre length 3 hashvalue 32 hence return fbxnote bxz hash 32 appear later fbx Constraints1 k slength 2 1041 power modulo 1090 hashValue modulos consist lowercase english letter onlythe test case generate answer exist