In the previous post, we discussed various pattern-matching algorithms, let us now see a few problems based on it. Given two strings, one is a text string and the other is a pattern string. The task is to print the indexes of all the occurrences of pattern string in the text string. For printing, Starting Index […]
May 21, 2023 | Data Structure | No comments
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
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
What is a 2D Array? A 2D matrix is a two-dimensional array that contains rows and columns in data structures and methods. It is also known as a two-dimensional array. A matrix can be represented in code as a 2D array, where each element of the array is itself an array, and each row of […]
April 15, 2023 | Data Structure | No comments
Coding Challenge websites you can use to develop your coding skills and the best way to improve your skill when learning to code is by solving coding challenges.
September 4, 2020 | general | No comments