Fidessa interview question

HackerRank Challenges, 1) No of Gates 2) String Matching Algorithm