TikTok Interview Question

two sum. and reverse linked list