DEV Community

Rishitha Nallapureddy
Rishitha Nallapureddy

Posted on

Journal - 18-10-24

Hey, I am so delighted to say that I was able to take the next step in my competitive programming journey. I started from knowing nothing about linked lists and have now begun learning some of the tougher concepts. After covering the basics, I moved on to more complicated topics. I’ve learned about linked lists and tackled a few related questions over the past few days. Today, I focused on Dojo-related questions, as I need them for my upcoming dojo this week. I made a plan with that in mind.

Friday completed the week with three advanced problems: Longest Valid Parentheses, Frog Jump, and Merge k Sorted Lists.

The first problem was Longest Valid Parentheses: given a string containing only parentheses, find the length of the longest valid substring of balanced parentheses. Using a stack to track unmatched parentheses and their indices, I calculated the maximum valid length efficiently.

For Frog Jump, I was to determine whether a frog could cross a river by jumping between stones, where the jump length at each step would depend on the previous jump. This dynamic programming problem required me to construct a set-based state tracker for each stone and to keep track of all possible jump lengths.

Lastly, I worked on Merge k Sorted Lists. This classic problem involved merging multiple sorted linked lists into one. Using a priority queue, I maintained the smallest elements from each list and merged them.

Top comments (0)