加载中...
import java.util.*; public class Solution { /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param nums int一维数组 * @return int二维数组 */ public int[][] foundMonotoneStack (int[] nums) { // write code here } }
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param nums intvector * @return intvector
> */ vector
> foundMonotoneStack(vector
& nums) { // write code here } };
# # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # # @param nums int一维数组 # @return int二维数组 # class Solution: def foundMonotoneStack(self , nums ): # write code here
using System; using System.Collections.Generic; class Solution { /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param nums int一维数组 * @return int二维数组 */ public List
> foundMonotoneStack (List
nums) { // write code here } }
/** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param nums int一维数组 * @return int二维数组 */ function foundMonotoneStack( nums ) { // write code here } module.exports = { foundMonotoneStack : foundMonotoneStack };
# # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # # @param nums int整型一维数组 # @return int整型二维数组 # class Solution: def foundMonotoneStack(self , nums: List[int]) -> List[List[int]]: # write code here
package main /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param nums int一维数组 * @return int二维数组 */ func foundMonotoneStack( nums []int ) [][]int { // write code here }
/** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param nums int一维数组 * @param numsLen int nums数组长度 * @return int二维数组 * @return int* returnSize 返回数组行数 * @return int** returnColumnSizes 返回数组列数 */ int** foundMonotoneStack(int* nums, int numsLen, int* returnSize, int** returnColumnSizes ) { // write code here }
# # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # # @param nums int一维数组 # @return int二维数组 # class Solution def foundMonotoneStack(nums) # write code here end end
object Solution { /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param nums int一维数组 * @return int二维数组 */ def foundMonotoneStack(nums: Array[Int]): Array[Array[Int]] = { // write code here } }
object Solution { /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param nums int整型一维数组 * @return int整型二维数组 */ fun foundMonotoneStack(nums: IntArray): Array
{ // write code here } }
import java.util.*; public class Solution { /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param nums int整型一维数组 * @return int整型二维数组 */ public int[][] foundMonotoneStack (int[] nums) { // write code here } }
/** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param nums int整型一维数组 * @return int整型二维数组 */ export function foundMonotoneStack(nums: number[]): number[][] { // write code here }
public class Solution { /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param nums int整型一维数组 * @return int整型二维数组 */ func foundMonotoneStack ( _ nums: [Int]) -> [[Int]] { // write code here } }
struct Solution{ } impl Solution { fn new() -> Self { Solution{} } /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param nums int整型一维数组 * @return int整型二维数组 */ pub fn foundMonotoneStack(&self, nums: Vec
) -> Vec
> { // write code here } }
[3,4,1,5,6,2,7]
[[-1,2],[0,2],[-1,-1],[2,5],[3,5],[2,-1],[5,-1]]
[1,1,1,1]
[[-1,-1],[-1,-1],[-1,-1],[-1,-1]]