Beruflich Dokumente
Kultur Dokumente
Vol. 02, Issue 05, SEPT- OCT, 2015 Pg. 224-229 WWW.IJEETE.COM
1
Assistant Professor, MCA Department
Pimpri Chinchwad College of Engineering, University of Pune, India.
2
Research Scholar, MCA Department
Pimpri Chinchwad College of Engineering, University of Pune, India.
variable to point to the position of the top element 2. DATA STRUCTURE THROUGH STACK
of the stack.
Stack can mostly used to manage the function Structure of stack may be internal stack and
calls. There are various applications of stack like external stack. Generally stack is used for storing
recursion interrupt handling, inter conversion internal function calls in memory In memory
between prefix, infix, and postfix expressions, internally stack of return address of function calls is
matching parenthesis in an expression etc.[2] But mentioned. It is also used to pass parameters to
the stack has the restriction of insertion and functions. There may be a one stack supported by
removal of elements from stack that is in LIFO instruction set called as Single Stack computers.
manner. But this can be overcome by using the
concept of multiple stacks data structure. This stack is used for arithmetic expression
Circular stack has a super-power on the push and evaluation, expression conversion, storing return
pop of the elements in both sides, it mean the front addresses, checking matching parenthesis of
and back (element should pop at the side where it expression.[5] This type of stack is very easily
was actually pushed). The implementation of stack implemented in memory with one block of
is behaves in circular manner. Imagine the memory. But the disadvantaged of this stack is to
operation will flow as a circular queue but without mention parameter list while function calls for each
compromising the stack behaviour. process leads to overhead of maintaining multiple
Diagrammatically representation of circular stack is stacks in memory.
as shown: Circular stack concept used to create stacks
one after the other as per instruction set. This type
of stack is used in all applications of single stack as
storing return addresses, fetching parameters,
expression evaluation and expression conversion
where parameter stack is maintained separately
than address stack. One of the example or
application of circular stack which has two stack
named front stack and back stack working parallel
as single stack. This multiple stack contains some
variables as
Place space element one step before Empty deep then go to step 9
3. Assign deep-1 to i
space element then Decrement Deep and root and
return popped Item else if Deep - 1 is not equal to //shift data to right next data
4. Assign Space[i] to Space[i+1]
Root. Then Print Message: Front Empty else Print
5. Decrease i by 1
Message: Empty and return null
6. if i>=0 then go to step 4
7. Assign item to Space[0] i.e. shift item to one
Function Pop Back
place ahead
8. Increase Root and Deep by 1
In this function if Deep has value -1 that is less
9. Display “Stack is Full”
than Space Length And Deep as -1 that is greater
10. Stop
than Root then Deep item is the popped items.
Then make the space empty at deep and
decrement deep and return popped Item else if the
value of Root is equals -1 then Print Message:
11. if (Deep - 1 != Root) then Display “Front Code for Pop Back
Empty” void PopBack()
else {
Display “Empty” if (Deep -1 < 5 && Deep -1 > Root)
12. Stop {
int popedItem = Space[Deep-1];
Code for Pop Front Space[Deep -1] = 0;
void Pop Front() Deep--;
{ cout<<"\nPoped data="<<popedItem;
if ( Deep > -1 && Root != -1) }
{ else
int popedItem = Space[0]; {
for (int i = 0; i < Deep-1; i++) if (Root == -1)
{ {
Space[i] = Space[i + 1]; cout<<"Empty";
} }
Space[Deep-1] = 0; else
Root--; {
Deep--; cout<<"BackEmpty";
cout<<"\ndata poped="<<popedItem; }
}
} }
else
{
if (Deep - 1 != Root)
{
cout<<"FrontEmpty";
}
else
{
cout<<"Empty";
}
}
}
the anagrams of a given word. That is, given an occurred in linear stack. Various applications
N-letter word with all letters different, print all where circular stack is used is discussed in this
the "words" you can form using each letter once, paper.
regardless of whether they are actual words in
some language. The number of such REFERENCES
rearrangements is N-factorial where N is the 1. James Basile. Implementing Data Structures in
number of letters. The problem can be solved in FORTH, The Journal of Forth Application and
several different ways, one of which uses stack. A Research Vol. I . Number 2. Dec. 1983.
simple technique for implementing Or-parallelism 2. Dinesh P. Mehta, Sartaj Sahni, Handbook of
and And-parallelism on distributed machines is DATA STRUCTURES and
solved by stack splitting concept. Stack-splitting APPLICATIONS, ,pages 2-1 to 2-13,
naturally incorporates efficient scheduling and CHAPMAN & HALL/CRC,2005
reduced communication between processors. 3. Joachim Hammer, Markus Schneider, Data
[7].The multi stack implemented using circular Structures for Databases, pages 60-1 to 60-21,
way as circular stack, as data-path chips such as 2001 by CRC Press, LLC
microprocessors and RISC chips become more 4. B. K. Tripathy and S. S. Gantayat, On the
complex, stacks of data-path macros are required implementation of data structures through
to implement the entire data-path. [4] The theory of lists, IJITCS, Vol.2, No.4, August
physical decomposition of a chip into a single 2012
data-path stack, and control logic of random logic 5. Philiph Koopman, Stack Computers the new
as in the past is not always feasible therefore wave, Mountain view press, 1989
special multi-stack structure is used optimization 6. Yan Wang, Implementation of Protocol
techniques and algorithms to partition, place and Stacks, Technical Report IDE0746, June 2007
wire the data-path macros in the form of the 7. Gopal Gupta, Enrico Pontelli, stack splitting:
multi-stack structure, taking into account the A simple technique for implementing Or-
connectivity of the entire chip logic (data-path, parallelism and And-parallelism on distributed
control logic, chip drivers, on-chip memory). machines
Secondly, a novel multi-stack CMOS device 8. Mark Sherman, Andy Hisgen, Jonathan
structure is proposed, the operation of the Rosenberg, Davis Alex Lamb, Functions
structure is fully analyzed for high power CMOS Returning values of Dynamic Size, Feb 1984,
switch design. The structure is also implemented Technical Report PCS-TR86-125
in a standard 0.18-um triple-well CMOS process,
and its performance is fully characterized. The AUTHOR’S BIBLOGRAPHY
proposed switch device incorporates multi-stack Poonam Katyare is Assistant
NMOS switches, one of which has a switch at the Professor at MCA department,
bulk and the others of which have a connection Pimpri Chinchwad College of
between the bulk and the source in order to Engineering, Akurdi Savitribai
provide high power handling capability to the Phule Pune University, India. She
transmit switch side[8]. obtained her M.C.A degree from North
Maharashtra, Kolhapur (2006).She is currently
CONCLUSION doing research in Data Mining and Knowledge
We have given an overview the concept of Discovery. She has published research papers in
circular stack data structure. We tried to focus on various journals and conferences.
the issues related to the design of single data
structures. Our overview clearly illustrates that Nikita Awati is a student of MCA
the design of circular data structures provides department, Pimpri Chinchwad
significant usage of data from multiple ends. College of Engineering, Akurdi
Paper mainly focuses on implementation of Savitribai Phule Pune University,
circular stack with all its operations. Circular India. She is currently doing
stack overcomes memory problems which research in data structure.