DEV Community

Rishitha Nallapureddy
Rishitha Nallapureddy

Posted on

Journal - 4-11-24

Hi, Folks! Today, I solved three problems on LeetCode: Koko Eating Bananas, Maximize the Confusion of an Exam, and Target Sum. Today is the start of the week, so I planned to solve some problems this week. This can help me understand data structures better. There are some problems that I repeated in this week’s plan because I feel that these problems are conceptual and tough to understand. These problems may take practice several times to get a better understanding. So, repeating problems like N-Queens will be helpful.

In LeetCode, there are so many problems, and it is not important how many problems we solve. The concepts we learn and the logic we apply really matter a lot. Koko Eating Bananas and Maximize the Confusion of an Exam are revision problems for today. They helped me go through the logic once again, and I also learned some concepts in data structures, such as deque, stacks, and queues. Revising all the concepts will help us memorize the important ones for a long time.

To solve the target sum problem, we will use dynamic programming (DP). The DP approach will help us keep track of how many solutions we have found. Since we need to return the total number of possible solutions from the array to get the target element, this method will help us to solve the problem.

I hope my experience will be helpful.

Top comments (0)