coderz.py

Keep Coding Keep Cheering!

Problems based on Strings

In the previous post, we got an introduction to Strings and their methods. Let us now take a look at a few problems related to it. Given a string s, return the longest palindromic substring in s. Example: Input: s = “babad” Output: “bab” Explanation: “aba” is also a valid answer. Solution: Time complexity: O(n^3), where n is the length […]

May 3, 2023 | Data Structure | No comments

Advertisement