Frage im Vorstellungsgespräch bei Jump Trading

Given 2 string and a parent string find index matches of both in parent Comment very complex python code