Hi Everyone,
I always find myself in a tough spot while evaluating the time and space complexity of my code during an interview or otherwise when I solve problems on Leetcode.
The complexities of order :
Recently, in the monthly challange I solved the following two problems correctly, but I was not able to identify the space complexity:
https://leetcode.com/problems/word-break/
1.1) My TLE solution - solved 36/43 testcases - https://leetcode.com/submissions/detail/402590510/
1.2) My Accepted solution - (Using caching to save results) - https://leetcode.com/submissions/detail/402942753/
https://leetcode.com/problems/combination-sum/
2.1) My Accpeted Solution1 - https://leetcode.com/submissions/detail/403473588/
2.2) My Accepted Solution2 - https://leetcode.com/submissions/detail/403480124/
Also, could not understand whether the above two solutions have different time comlexities.
It would be great if someone could share same useful information/links that could help me get better at understanding the time comlexities.
Cheers