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

DSA: Strings Concept

What is a String? A string is a character sequence in computer science. It’s one of the most used data types in programming, and it’s used to represent text like names, addresses, and messages. Storage: A string is normally stored in memory as a contiguous block of memory holding the character sequence. Depending on the […]

May 2, 2023 | Data Structure | No comments

Advertisement