leetcode-potd

3042. Count Prefix and Suffix Pairs I

leetcode-potd

You are given a 0-indexed string array words. Let’s define a boolean function isPrefixAndSuffix that takes two strings, str1 and str2: isPrefixAndSuffix(str1, str2) returns true if str1 is both a prefix and a suffix of of str2, and false otherwise. For

2381. Shifting Letters II

leetcode-potd

You are given a string s of lowercase English letters and a 2D integer array shifts where shifts[i] = [starti, endi, directioni]. For every i, shift the characters

Scroll to Top