921. Minimum Add to Make Parentheses Valid
1762. Buildings With an Ocean View
1762. Buildings With an Ocean View
Description
There are n
buildings in a line. You are given an integer array heights
of size n
that represents the heights of the buildings in the line.
1768. Merge Strings Alternately
1768. Merge Strings Alternately
Description
You are given two strings word1
and word2
. Merge the strings by adding letters in alternating order, starting with word1
. If a string is longer than the other, append the additional letters onto the end of the merged string.
827. Making A Large Island
3430. Maximum and Minimum Sums of at Most Size K Subarrays
3430. Maximum and Minimum Sums of at Most Size K Subarrays
Description
You are given an integer array nums
and a positive integer k
. Return the sum of the maximum and minimum elements of all subarrays with at most k
elements.
3429. Paint House IV
3428. Maximum and Minimum Sums of at Most Size K Subsequences
3428. Maximum and Minimum Sums of at Most Size K Subsequences
Description
You are given an integer array nums
and a positive integer k
. Return the sum of the maximum and minimum elements of all subsequences of nums
with at most k
elements.
3424. Minimum Cost to Make Arrays Identical
3424. Minimum Cost to Make Arrays Identical
Description
You are given two integer arrays arr
and brr
of length n
, and an integer k
. You can perform the following operations on arr
any number of times:
1570. Dot Product of Two Sparse Vectors
1570. Dot Product of Two Sparse Vectors
Description
Given two sparse vectors, compute their dot product.