Given an integer array nums, partition it into two contiguous subarrays, left and right, such that all elements in left are less than or equal to all elements in right. The size of left should be as small as possible, and both subarrays must be non-empty. Your task is to return the length of the left subarray after performing such a partition.
Given two arrays of strings words1 and words2, find all the strings in words1 that are universal. A string from words1 is considered universal if it contains all the letters of every string in words2, including multiplicity. Each string in words2 is a subset of the string from words1.
You are given a circular integer array nums of length n. A circular array means that the end of the array connects back to the beginning. Your task is to find the maximum possible sum of a non-empty subarray of nums, which can wrap around the array. Formally, you need to find the maximum sum of a subarray where the subarray can either be within the linear array or it can wrap around from the end to the beginning.
You are given a binary array nums and an integer goal. Your task is to return the number of non-empty contiguous subarrays that have a sum equal to the given goal. A subarray is defined as any contiguous part of the array.
Given a square matrix of integers, your task is to find the minimum sum of any falling path through the matrix. A falling path starts at any element in the first row and chooses the next element from the row directly below it, which can be either directly below, diagonally left, or diagonally right.
You are given an n x n binary matrix where 1 represents land and 0 represents water. There are exactly two islands in the grid, and you need to connect them by flipping the smallest number of 0’s to 1’s. An island is a group of 1’s that are connected horizontally or vertically. Your task is to find the minimum number of flips required to connect the two islands.