Help Needed for MATCHIT(Challenge Problem) January Long Challenge 2019!!!

Can someone give a proper detailed editorial for MATCHIT(Challenger Problem) for January Long challenge

//