加载中...
import java.util.*; import java.util.Stack; public class Solution { Stack
stack1 = new Stack
(); Stack
stack2 = new Stack
(); public void push(int node) { } public int pop() { } }
class Solution { public: void push(int node) { } int pop() { } private: stack
stack1; stack
stack2; };
# -*- coding:utf-8 -*- class Solution: def __init__(self): self.stack1 = [] self.stack2 = [] def push(self, node): # write code here def pop(self): # return xx
class Solution { public void push(int node) { } public int pop() { } }
function push(node) { // write code here } function pop() { // write code here } module.exports = { push : push, pop : pop };
# -*- coding:utf-8 -*- class Solution: def __init__(self): self.stack1 = [] self.stack2 = [] def push(self, node): # write code here def pop(self): # return xx
package main var stack1 [] int var stack2 [] int func Push(node int) { } func Pop() int{ }
/** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param node int整型 * @return 无 */ void push(int node ) { // write code here } /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param 无 * @return int整型 */ int pop() { // write code here }
object Solution { /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param node int整型 * @return 无 */ fun push(node: Int) { // write code here } /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param 无 * @return int整型 */ fun pop(): Int { // write code here } }
/** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param node int整型 * @return 无 */ export function push(node: number) { // write code here } /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param 无 * @return int整型 */ export function pop(): number { // write code here }
public class Solution { /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param node int整型 * @return 无 */ func push ( _ node: Int) { // write code here } /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param 无 * @return int整型 */ func pop () -> Int { // write code here } }
["PSH1","PSH2","POP","POP"]
1,2
["PSH2","POP","PSH1","POP"]
2,1