Tag: String Algorithms
Given a string, your task is to count how many palindromic substrings in this string. The substrings with different start indexes or end indexes are counted as different substrings …
Given a string S of lowercase letters, a duplicate removal consists of choosing two adjacent and equal letters, and removing them. We repeatedly make duplicate removals on S until …
Given two strings S and T, return if they are equal when both are typed into empty text editors. # means a backspace character. Example 1: Input: S = …
Write a method that reverses the given input string. Example: Given s = “12345”, return “54321”. STL The C++ STL provides the reverse method that does the job. class …
This is classified as a hard puzzle: https://leetcode.com/problems/palindrome-pairs/ A palindrome string is a string whose reverse string is exactly the same, e.g. ABBA, 1, UIU… Brute Force Almost every …