3292. Minimum Number of Valid Strings to Form Target II
You are given an array of strings
words
and a stringtarget
.A string
x
is called valid ifx
is a prefix of any string inwords
.Return the minimum number of valid strings that can be concatenated to form
target
. If it is not possible to formtarget
, return-1
.A prefix of a string is a substring that starts from the beginning of the string and extends to any point within it.
3291. Minimum Number of Valid Strings to Form Target I
You are given an array of strings
words
and a stringtarget
.A string
x
is called valid ifx
is a prefix of any string inwords
.Return the minimum number of valid strings that can be concatenated to form
target
. If it is not possible to formtarget
, return-1
.A prefix of a string is a substring that starts from the beginning of the string and extends to any point within it.
3290. Maximum Multiplication Score
You are given an integer array
a
of size 4 and another integer arrayb
of size at least 4.You need to choose 4 indices
i0
,i1
,i2
, andi3
from the arrayb
such thati0 < i1 < i2 < i3
. Your score will be equal to the valuea[0] * b[i0] + a[1] * b[i1] + a[2] * b[i2] + a[3] * b[i3]
.Return the maximum score you can achieve.
3289. The Two Sneaky Numbers of Digitville
In the town of Digitville, there was a list of numbers called
nums
containing integers from0
ton - 1
. Each number was supposed to appear exactly once in the list, however, two mischievous numbers sneaked in an additional time, making the list longer than usual.As the town detective, your task is to find these two sneaky numbers. Return an array of size two containing the two numbers (in any order), so peace can return to Digitville.
3288. Length of the Longest Increasing Path
You are given a 2D array of integers
coordinates
of lengthn
and an integerk
, where0 <= k < n
.
coordinates[i] = [xi, yi]
indicates the point(xi, yi)
in a 2D plane.An increasing path of length
m
is defined as a list of points(x1, y1)
,(x2, y2)
,(x3, y3)
, …,(xm, ym)
such that:
xi < xi + 1
andyi < yi + 1
for alli
where1 <= i < m
.(xi, yi)
is in the given coordinates for alli
where1 <= i <= m
.Return the maximum length of an increasing path that contains
coordinates[k]
.
3287. Find the Maximum Sequence Value of Array
You are given an integer array
nums
and a positive integerk
.The value of a sequence
seq
of size2 * x
is defined as:
(seq[0] OR seq[1] OR ... OR seq[x - 1]) XOR (seq[x] OR seq[x + 1] OR ... OR seq[2 * x - 1])
.Return the maximum value of any subsequence of
nums
having size2 * k
.