V TIC Services interview question

intersection of the linked list . two dp problem