All Paths From Source to Target

Time related doubt below my code and someone else and both implemented in same way still mine slow. Plz help whats the difference so that I can optimize my code:
Both using dfs onlyyyy

problem>> https://leetcode.com/problems/all-paths-from-source-to-target/

My code>> https://ide.codingblocks.com/s/478611
Someone code>>> https://ide.codingblocks.com/s/478610

hello @joshisanjay8467
pass ur curr vector by reference

yeah yeah I just saw that I am creating new everytime thankyou!

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.