1930. Unique Length-3 Palindromic Subsequences
Given a string s, return the number of unique palindromes of length three that are a subsequence of s. Note that even if there are multiple ways […]
Given a string s, return the number of unique palindromes of length three that are a subsequence of s. Note that even if there are multiple ways […]
You are given a 0-indexed integer array nums of length n. nums contains a valid split at index i if the following are true: The sum of the first i +
You are given a 0-indexed array of strings words and a 2D array of integers queries. Each query queries[i] = [li, ri] asks us to find the
Given a string s of zeros and ones, return the maximum score after splitting the string into two non-empty substrings (i.e. left substring and right substring). The score after splitting a
You have planned some train traveling one year in advance. The days of the year in which you will travel
Given the integers zero, one, low, and high, we can construct a string by starting with an empty string, and then at each step
You are given a list of strings of the same length words and a string target. Your task is to form target using the given words under the
Given an integer array nums and an integer k, find three non-overlapping subarrays of length k with maximum sum and return them. Return the result
You are given an integer array nums and an integer target. You want to build an expression out of nums by adding one of the
There exist two undirected trees with n and m nodes, numbered from 0 to n – 1 and from 0 to m – 1, respectively. You are given two 2D integer arrays edges1 and edges2 of lengths n
You are given a 0-indexed array heights of positive integers, where heights[i] represents the height of the ith building. If a person is in building i, they can move
You are given an integer array arr of length n that represents a permutation of the integers in the range [0, n – 1]. We