2370. Longest Ideal Subsequence
2370. Longest Ideal Subsequence You are given a string s consisting of lowercase letters and an integer k. We call a string t ideal if the following conditions are satisfied: t is a subsequenc...
2370. Longest Ideal Subsequence You are given a string s consisting of lowercase letters and an integer k. We call a string t ideal if the following conditions are satisfied: t is a subsequenc...
124. Binary Tree Maximum Path Sum A path in a binary tree is a sequence of nodes where each pair of adjacent nodes in the sequence has an edge connecting them. A node can only appear in the sequen...
1559. Detect Cycles in 2D Grid Given a 2D array of characters grid of size m x n, you need to find if there exists any cycle consisting of the same value in grid. A cycle is a path of length 4 or...
2426. Number of Pairs Satisfying Inequality You are given two 0-indexed integer arrays nums1 and nums2, each of size n, and an integer diff. Find the number of pairs (i, j) such that: 0 <= ...
2611. Mice and Cheese There are two mice and n different types of cheese, each type of cheese should be eaten by exactly one mouse. A point of the cheese with index i (0-indexed) is: reward1[...
678 Valid Parenthesis string Given a string s containing only three types of characters: '(', ')' and '*', return true if s is valid. The following rules define a valid string: Any left paren...
Given an integer array nums, return the maximum result of nums[i] XOR nums[j], where 0 <= i <= j < n.