Questions tagged as 'pilas'

2
answers

Create a LIFO stack system with discard when full in Java

I want to design a system, establishing a data warehouse method, stack style, but with the peculiarity that when the maximum is reached (3) the first element of the stack is eliminated, thus only keeping the last values. General design:...
asked by 03.07.2016 / 23:02
2
answers

How do I extract data from the end of a dynamic stack?

I'm designing a C ++ program with a dynamic stack but when I extract the data I want it to be inverted, they can help me. This is my code: #include <iostream> using namespace std; #define true 1 #define false 0 struct docentes{...
asked by 17.10.2018 / 10:38
1
answer

Stack of batteries in java

I have several final projects in the subject Data Structure. In all I'm doing well, but in this specific, for more than I try, I can not find the solution. The problem proposes the following:    Stack of pilitas: The elements of ED PILITA...
asked by 26.10.2016 / 03:33
2
answers

Doubts about C ++ batteries

I have a question with a battery exercise, whose code is the one you have below, what I want to ask is why the operands are unstacked , they are popped, before operating with them ? I mean this: const int r_op = stack_.top(); stack_.pop(); //...
asked by 20.07.2017 / 19:16
0
answers

How to operate the push and print a Stack with fixes?

It turns out that I want to make batteries with fixes, and I want to run the push and print, but I print it with errors. What corrections can I make? if possible, pop also want to do it, but I have no idea how to do it. Code: Pilas.h #p...
asked by 20.09.2018 / 03:06
1
answer

Postfix to tree and then to stack C ++

I'm trying to make the following pseudocodigo Pseudocodigo: Algoritmo-Posfija-Árbol INICIO Crear pila y árbol, inicialmente vacíos MIENTRAS posfija no este vacía y no hay errores HACER Extraer el primer termino de posfija (...
asked by 12.04.2017 / 19:12
1
answer

Doubt in data structure Batteries

I have a question with exercise of batteries that I found, in this exercise, it looks for how many times a letter is repeated and also returns the number of letters that are in an even position. I have several doubts, one of them is in this p...
asked by 20.07.2017 / 22:06
2
answers

Stacks with fixes in c ++

I need to make a code that meets these conditions: I already made the program using linked lists: #include<iostream> using namespace std; struct nodo{ int dato; nodo *sig=NULL; }; void apilar(nodo *&inicio,int x);...
asked by 24.07.2017 / 19:27
1
answer

Doubt pop procedure stacks c ++

this code shows in reverse order the contents of the list linked from node n with the help of a stack. One question, if instead of showing the content of the list in reverse order, I want to show it in normal order, how should I handle the stack...
asked by 25.07.2017 / 14:30
2
answers

Delete item from a stack

I have a whole type stack in the console of c # and I want to delete an element inside it, the element must be written by the user, for example: If I have the data in the stack: 12, 34, 54, 6, 44, a message will appear on the screen: "Enter the...
asked by 07.11.2018 / 02:06