1368. Minimum Cost to Make at Least One Valid Path in a Grid
Given an m x n grid. Each cell of the grid has a sign pointing to the next cell you should visit […]
Given an m x n grid. Each cell of the grid has a sign pointing to the next cell you should visit […]
A 0-indexed array derived with length n is derived by computing the bitwise XOR (⊕) of adjacent values in a binary array original of length n. Specifically, for each index i in the range [0,
You are given two 0-indexed arrays, nums1 and nums2, consisting of non-negative integers. There exists another array, nums3, which contains the bitwise XOR of all pairings of integers
Given two positive integers num1 and num2, find the positive integer x such that: x has the same number of set bits as num2, and The value x
You are given two 0-indexed integerpermutations A and B of length n. A prefix common array of A and B is an array C such that C[i] is equal to the count of numbers that are present
You are given a string s. You can perform the following process on s any number of times: Choose an index i in the string such
A parentheses string is a non-empty string consisting only of ‘(‘ and ‘)’. It is valid if any of the following conditions is true: It is (). It can
You are given an array of strings words and a string pref. Return the number of strings in words that contain pref as a prefix. A prefix of a string s is any
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
Given an array of string words, return all strings in words that is a substring of another word. You can return the answer in any order. A substring is
You have n boxes. You are given a binary string boxes of length n, where boxes[i] is ‘0’ if the ith box is empty, and ‘1’ if it contains one ball. In one operation, you can
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