This question on LeetCode took me the whole night to solve, and it's another typical dynamic programming problem. It seems like I have been encountering a lot of DP problems lately.
5.Longest Palindromic Substring
This question on LeetCode is similar to the 516. Longest Palindromic Subsequence. Therefore, I'm also using the same dynamic programming solution to solve. However, there are slight differences. Here, we are using the dp array to store the boolean value indicating whether the substring from index i to j is a palindromic substring.
78.Subsets
46.Permutations
6.Zigzag Conversion
This question on LeetCode was so interesting that I initially tried to find a pattern or rule to solve it. However, after an hour of unsuccessful attempts, I decided to write an easy and straightforward solution that I came up with. Later on, I discovered this Youtube video, which presents a more elegant and cleaner solution.