Capital One Interview Question

Coding Round in arrays and linked list