CARS24.com interview question

Custom hooks and given a situation to make one