Questions tagged as 'pilas'

2
answers

What method can I do to invert the first element of the stack at the top of the stack?

class Program { class Nodo { public int info; public Nodo sig; } private Nodo raiz; public Program() { raiz = null; } public void Insert...
asked by 17.04.2018 / 01:46
0
answers

Help with Automata Battery in C

I am developing a work on automata and it is not clear to me the application of the stack in this one. I did not want to go to this page because I wanted to solve my doubts by my own merit, but due to the time and complications I could not, s...
asked by 17.06.2017 / 22:59
2
answers

Is it possible to make a Stack with JList?

My program should perform the function of a stack (Stack). I did it with an interface, I used a texfield and a button to put the data that will be entered into the stack (JList) and if they are entered in the JList the problem is that I do not...
asked by 08.11.2016 / 08:15
1
answer

Stacks a file in C

I have thought to pass the data from a stack to a binary file, I have done a few steps but I think they are wrong, I see the last element element introduced, I mean the first one in the stack. Code: typedef struct nodo { int dato; s...
asked by 04.09.2017 / 22:14
1
answer

How to verify if an item is in a stack and then pass it to a queue in c ++ using standard libraries (stl)

Good morning. I have a doubt with a c ++ code, in which I use stacks and tails, basically I have to build a stack and a dictionary, both of characters, for each character belonging to the stack to verify if it is in the dictionary, and if the an...
asked by 15.03.2017 / 04:43
1
answer

How can I make a file with the structure of a stack? [closed]

I have a stack of 3 elements and when closing the program, this program has to write a file emptying the remaining elements of a stack and then read them from the file and add them to the stack in the same way they were inserted. That is, if...
asked by 11.10.2017 / 22:14
1
answer

Doubt with exercise doubly linked lists

I have a battery exercise, it says:    Implement the dll_t void class method   select (dll_t * > & L, const T & x), which saves   within the list L the pointers to nodes of the invoking list that has as content x. also, they give...
asked by 23.07.2017 / 01:24
1
answer

Doubt exercise stack based on lists

I found a solved exercise where batteries and lists are used that generated doubts, this is:    Implement the non-recursive method of class dll_t ostream& write_reverse (dll_node_t<T>* n, ostream& os) const that...
asked by 24.07.2017 / 13:53
2
answers

Is my battery program correct?

I made this program from a stack, but sometimes in the "output" array I get data that is not, that is, I give it to withdraw and sometimes I pass the data removed to the "output" array as it should be , but other times it puts me very large numb...
asked by 22.10.2018 / 00:24
1
answer

search for elements of a c ++ stack

Good evening I have the code of a practical job with the opcones to insert items into a stack and search, when looking for this number I have to extract all those that are divisible by the same number entered. Here is the code, the part where th...
asked by 03.10.2018 / 04:17