https://en.wikipedia.org/wiki/Modular_arithmetic
The proof. Just if you need.
But I think leetcode and all these solutions out there should fucking link this article. Idk. Never seen this property and never knew about it.
The proof. Just if you need.
But I think leetcode and all these solutions out there should fucking link this article. Idk. Never seen this property and never knew about it.
andreyka26_se
Another way might be just to play and inductively show that it always works, if you don't know it during the interview: For numbers 37 and 17 with mod 10, whatever you add up to them - it will always equalize results
This is mostly what you should use, if you are not great in theory (as me).
Just start playing with small and simple examples and see the pattern
Just start playing with small and simple examples and see the pattern
This problem a bit frustrated me.
518. Coin Change II
https://leetcode.com/problems/coin-change-ii/description/
At first glance, it looks like easy-peasy DP. You try recursion + memoization at first, and aparently it does not work, cause typical 1 dimension DP gives you number of permutations, but the problem asks for number of combinations.
518. Coin Change II
https://leetcode.com/problems/coin-change-ii/description/
At first glance, it looks like easy-peasy DP. You try recursion + memoization at first, and aparently it does not work, cause typical 1 dimension DP gives you number of permutations, but the problem asks for number of combinations.
LeetCode
Coin Change II - LeetCode
Can you solve this real interview question? Coin Change II - You are given an integer array coins representing coins of different denominations and an integer amount representing a total amount of money.
Return the number of combinations that make up that…
Return the number of combinations that make up that…
🤯1
8PM Prague time +-. Will be the most natural stream, we gonna just walk through as much problems as we can. Mostly the problems should be unsolved by me before or solved years ago, so I don't remember
❤2
andreyka26_se
This problem a bit frustrated me. 518. Coin Change II https://leetcode.com/problems/coin-change-ii/description/ At first glance, it looks like easy-peasy DP. You try recursion + memoization at first, and aparently it does not work, cause typical 1 dimension…
I can show also this DP problem, what is the solution and why. Put thumbs up if you'd like to take a look at it. 3+ thumbs and we are doing it
TL; DR;
Don't invest much time in learning specific tool, framework or language internals if the purpose is only for "self study, self improvement, self learning", cause
- it makes you have wrong assumptions about work of other similar tool (Postgres != Mysql, .NET != Python, etc).
- it is very time consuming
- over the years, when you gotta switch to other tools, frameworks and tools - you will forget all you knew
- over the years tools are going to evolve, and all your knowledge and effort is going to be deprecated
Don't invest much time in learning specific tool, framework or language internals if the purpose is only for "self study, self improvement, self learning", cause
- it makes you have wrong assumptions about work of other similar tool (Postgres != Mysql, .NET != Python, etc).
- it is very time consuming
- over the years, when you gotta switch to other tools, frameworks and tools - you will forget all you knew
- over the years tools are going to evolve, and all your knowledge and effort is going to be deprecated
❤6🔥2