加载中...
import java.util.*; import java.util.ArrayList; public class Solution { public boolean IsPopOrder(int [] pushA,int [] popA) { } }
class Solution { public: bool IsPopOrder(vector
pushV,vector
popV) { } };
# -*- coding:utf-8 -*- class Solution: def IsPopOrder(self, pushV, popV): # write code here
using System; using System.Collections.Generic; class Solution { /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param pushV int整型一维数组 * @param popV int整型一维数组 * @return bool布尔型 */ public bool IsPopOrder (List
pushV, List
popV) { // write code here } }
function IsPopOrder(pushV, popV) { // write code here } module.exports = { IsPopOrder : IsPopOrder };
# # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # # @param pushV int整型一维数组 # @param popV int整型一维数组 # @return bool布尔型 # class Solution: def IsPopOrder(self , pushV: List[int], popV: List[int]) -> bool: # write code here
package main /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * @param pushV int整型一维数组 * @param popV int整型一维数组 * @return bool布尔型 */ func IsPopOrder( pushV []int , popV []int ) bool { // write code here }
/** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param pushV int整型一维数组 * @param pushVLen int pushV数组长度 * @param popV int整型一维数组 * @param popVLen int popV数组长度 * @return bool布尔型 */ bool IsPopOrder(int* pushV, int pushVLen, int* popV, int popVLen ) { // write code here }
# # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # @param pushV int整型一维数组 # @param popV int整型一维数组 # @return bool布尔型 # class Solution def IsPopOrder(pushV, popV) # write code here end end
object Solution { /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * @param pushV int整型一维数组 * @param popV int整型一维数组 * @return bool布尔型 */ def IsPopOrder(pushV: Array[Int],popV: Array[Int]): Boolean = { // write code here } }
object Solution { /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * @param pushV int整型一维数组 * @param popV int整型一维数组 * @return bool布尔型 */ fun IsPopOrder(pushV: IntArray,popV: IntArray): Boolean { // write code here } }
import java.util.*; public class Solution { /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * @param pushV int整型一维数组 * @param popV int整型一维数组 * @return bool布尔型 */ public boolean IsPopOrder (int[] pushV, int[] popV) { // write code here } }
/** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * @param pushV int整型一维数组 * @param popV int整型一维数组 * @return bool布尔型 */ export function IsPopOrder(pushV: number[], popV: number[]): boolean { // write code here }
public class Solution { /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * @param pushV int整型一维数组 * @param popV int整型一维数组 * @return bool布尔型 */ func IsPopOrder ( _ pushV: [Int], _ popV: [Int]) -> Bool { // write code here } }
struct Solution{ } impl Solution { fn new() -> Self { Solution{} } /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * @param pushV int整型一维数组 * @param popV int整型一维数组 * @return bool布尔型 */ pub fn IsPopOrder(&self, pushV: Vec
, popV: Vec
) -> bool { // write code here } }
[1,2,3,4,5],[4,5,3,2,1]
true
[1,2,3,4,5],[4,3,5,1,2]
false