DEV Community

Rishitha Nallapureddy
Rishitha Nallapureddy

Posted on

Journal - 25-10-24

Hi, Folks! Today, I solved three problems on LeetCode: Simplify Path, Score of Parentheses, and Longest Palindromic substring. As learners, we have to increase the complexity of problems step by step. We should not start with complex problems. Try to start with moderate level problems and gradually increase the complexity.

There are so many problems in LeetCode that start at moderate level and increases the complexity level step by step. As a Beginner, at first I felt really hard to solve palindrome problem. after solving this problem the level of problem increases which is one of the question solved by me today, Longest palindromic substring. In this way slowly increase the level of problems. If, on the first day itself, I had tried to solve longest palindromic substring problem, it might not be a easy task, and I might lost interest in problem solving.

Score of Parentheses: Traverse through the input string. Use the stack data structure to update the count. If you find the opening bracket, increment the count. If not, try to pop it from the stack. In this way we can solve this problem.

Simplify Path : Traverse through the input string. Use the stack data structure to update the output string. Depending on input special characters either pop it or push it into stack. In this way, we can solve this problem.

I hope my experience will be helpful.

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read more

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more