DEV Community

vinnu gollakoti
vinnu gollakoti

Posted on

Day 51 Journal

Hi, Folks! Today I solved three problems on LeetCode: Basic Calculator, Permutations and Maximum Subarray.

For Basic Calculator problem, we can use stack manage operators and parentheses. By popping elements when needed. This way and logic makes the basic calculator as a easier problem.

The Permutation problem can be solved using recursion. We can repeat the same function execution until all the possible combinations are added to result. In this way we can solve permutations problems on LeetCode.

The Maximum Subarray problem can be solved using single for loop. We iterate over the array to find the maximum sums, which helps us to identify maximum subarray. In this way we can solve the maximum subarray problem.

There are many problems around us which can be solved using data structures. Understanding how to apply these structures, like using a stack in the calculator problem, makes the problem more interesting and helps us to connect various concepts.

I hope my experience will be helpful.

Top comments (0)