stack

Implementation of the task using the c++stack

Task: divide the stack into 2 stacks. One has even numbers, the other has odd numbers. I got confused with the implementation ... t;< "Положили в нечётный стек:" << x << endl; }; } EvenPrint(begin1); OddPrint(begin2); }

The Stack class in Java

Which class is better for using the stack in java and why is it better?

Call a function in Lua and get the return value in C++

How do I get data from a Lua script in C++ code? As I understand it, the data exchange from the script to the pros goes throu ... ror of the following content: Unprotected error in call to lua api (attempt to call a nil value) What did I do wrong ?

Help us understand the difference between queues and stacks

I don't understand the topic of stack queues and variants from implementations. The extract from what I managed to dig up in ... sm solve? Here I got a little confused, help me figure out what is needed for what, and what implementations it has. Thanks.

Stacks on Pascal

I solve a problem about the towers of Hanoi, if in general. I wrote procedures for working with PUSH, POP,and SHOW stacks. At ... in PUSH(S1,(11-i)); end; n:=0; for i:=1 to 10 do PUSH(S2,0); n:=0; for i:=1 to 10 do PUSH(S3,0); SHOW; end.

Are variables declared within blocks or subprograms dynamically allocated?

I am reading the book "Algorithms and programming with examples in Pascal and C" and in it there are two paragraphs that left ... allocation. This correct this statement? In my understanding, only allocation via pointers is considered dynamic allocation.

How to allocate a dynamic stack, with size provided by the user?

I want to allocate a dynamic stack with the size provided by the user, then treating it as a "vector" would be more or less w ... == NULL) return 0; Elem* no; no = (Elem*) malloc(tam * sizeof(Elem)); if(no == NULL) return 0; }

Invert a stack using an additional stack and some variables

I am needing to invert a stack a using another additional stack B and some variables in pseudo-code. So that Stack A is reversed at the end of the algorithm. Can anyone help?

Is it incorrect to state that in a stack-type data structure, the element that will be removed from the structure is the one that is stored in the header?

In a data structure test I had the following Question: In a stack-type data structure, the element that will be removed ... stack-type data structure, the element that will be removed from the structure is the one that is stored in the stack header?

What is the behavior of static variables no.NET?

What is the behavior of static variables in .NET? are they stored in the heap or in the stack?

How to access an attribute of an object within an object stack

I have several objects of the vehicle class with plate, model and anoFabri as attributes, inside a stack I created (stack.jav ... return placa + " " + modelo + " " + anoFabri; //To change body of generated methods, choose Tools | Templates. } }

Program C queue and stack

I created a program in C, to remove (or copy) the values of a queue, using the output rules of a stack and add them in a new ... ha.ini]=fila.dados[pilha.fim]; pilha.fim--; pilha.ini++; } } while (pilha.fim==0); }

JQuery error: Uncaught RangeError: Maximum Call stack size exceeded [closed]

Closed. this question is out of scope and is not currently accepting answers. ... is causing this error? Below my code: $('.botchat').click(function(){ $('#islpronto_link').click(); return; });

Stack implementation in C, How to pass values?

I am trying to do the implementation of a stack in C. The requested by the teacher is already basically done which was to sho ... struct of the code being declared as typedef struct stack which is a requirement as well... How can I work with this vector?

Reverse Dynamic Stack

Could anyone help me with this stack? The goal is to create a function that inverts the values of the stack, I tried to do th ... Pilha B tem mais elementos\n"); } Pilha *z = criaPilha(); z = inverter(b); int x = 0; x = desempilha(z); printf("%d", x); }

Dynamic stack - C

I am studying dynamic stack from the code below: #include <stdio.h> #include <stdlib.h> #define tam 50 // --- ... o assemble the structure, but I am in doubt in some parts that are commented in the code, in case what the specific lines do

Stacks with vectors in C, is showing the elements that have already been taken

How do I show my vector without the numbers that have been taken? For when I show it, even if I pull out a number in the func ... exibe(pilha); break; default: break; } }while( escolha != 4); }

How to implement a queue using two stacks

Hello, I need to implement a queue using two stacks, i.e. I need to insert an integer into Stack 1, and when I am removing an ... ->prox; free(aux); } return Topo; } Elemento* Top(Elemento *Topo){ return Topo; } What should I do?

If everything in C# inherits from Object, why are all types not by reference?

If, for example, a struct type inherits from the Class System.ValueType (which inherits from System.Object), Why is it, and t ... llocated in the heap ? When doing a boxing , we don't use the new operator, how is our type by value allocated in the heap?

What are they and Where are the "stack" and "heap"?

What are these stack and heap that talk so much about memory management? Are these really portions of memory as some people ... derstood by programmers. An explanation would be very useful for those who are starting out or have learned it the wrong way.