Category: string
Given a string s and an integer n, rearrange s into n rows so that s can be read vertically (top-down, left to right). Constraints Length of s ≤ …
You are given a lowercase alphabet string s, and an offset integer k. Replace every letter in s with a letter k positions further along the alphabet. Note: If …
Teaching Kids Programming: Videos on Data Structures and Algorithms What is a Palindrome string? A Palindrome is a string that spelt backwards is also the same, like “racecar”. Palindrome …
Given a string s , find the length of the longest substring t that contains at most 2 distinct characters. Example 1: Input: “eceba” Output: 3 Explanation: t is …
You are given two strings s and t which both have length n. You can pick one character in s and another in t and swap them. Given you …