quest link : https://leetcode.com/contest/weekly-contest-192/problems/paint-house-iii/
my solution : https://ide.codingblocks.com/s/251899
I dont know where i am going wrong??? TLE coming while submittuing the code
quest link : https://leetcode.com/contest/weekly-contest-192/problems/paint-house-iii/
my solution : https://ide.codingblocks.com/s/251899
I dont know where i am going wrong??? TLE coming while submittuing the code
@ssanjuchandra
in the help function pass houses and cost vector by reference(&). Otherwise for every function call it will take O(N) extra time for copying the value(pass by value).
I hope you will be able to solve it now.
Please mark the doubt as resolved it got it now.
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.