#competitive-programming
Read more stories on Hashnode
Articles with this tag
Welcome back to the daily leetcode problems, day 25. Link Problem Solution: Using Dynamic Programming. Call f[i] is a result for string start at...
Welcome back to the leetcode daily problem, 24th of December. Link Problem Solution: We can see that there are two cases for alternating: strings...
Link Problem. Solution: Because n ≤ 10^4, we can just simulate the whole process. Below is AC code: struct custom_hash { size_t operator()(const...
Link Problem Solution: Because we split the string into two different continuous parts, we are able to develop an efficient O(n) algorithm. Determine...
Link Problem Solution: Observe that for any pair of points in the 2D plane to satisfy the condition, you need their x-axis to be as close as...
I have the following problem: How many divisors does a given number n have? For example: n = 6 so the answer is 4 because we have 1, 2, 3, 6. Naive...