Prime Number

1 minute read

Intro Approach 1 gives the method to test whether n is a prime number.

LeetCode 204.

1 minute read

Intuition On first glimpse, I try DP and turn out TLE, shit again.

LeetCode 278.

less than 1 minute read

Intuition Binary Seaching to find the answer

LeetCode 1482.

2 minute read

Intuition I use dynamic programming on my first thought. It works but turns out to be TLE.

LeetCode 633.

less than 1 minute read

Intuition a^2 + b^2 = c; (a >= 0 & b >= 0 & a,b,c are integers)