Generation

generate functionThu, 20 Apr 2023

Pila Insertar valores a la pila

public Pila(){ this.tamano = 0; this.pila = new int[tamano]; } public void push(int valor){ int[] aux = new int[this.tamano+1]; for (int i = 0; i < this.tamano; i++) { aux[i] = this.pila[i]; } this.pila = aux; this.pila[this.tamano] = valor; this.tamano ++; }

Want to kickstart your project?Use the new AI Studio to create your code