It was so exciting to play the contest again. I did work on three algorithms, but I misunderstood the requirement for the last algorithm, and then I did not have enough time to finish the third one, I submitted the solution and the code passed online judge just one minute after the contest.
Here is my ranking.
Q2 - here is my discussion link on Leetcode.com using suffix, here is the link for prefix.
Solution failed to pass the test case in the contest:
Q4 - here is the discuss link.
Solution submitted after the contest, just one minute after the contest:
Q3 - here is the link.