how to impliment 2 or more stacks in a single dimensional
array ?
Answer / sakthigurunathan
to implement two stacks in a single array consider two
stacks growing towards each other and take tos1=-1
andtos2=max as empty condition and for full condition take
tos1=tos2-1 and to insert take push1 tos1++
and for push2 tos--
Is This Answer Correct ? | 36 Yes | 9 No |
What is maximum size of array in c?
How do you define CONSTANT in C?
Is there anything like an ifdef for typedefs?
WHAT IS MAXIMUM SIZE OF AN ARRAY IN C LANGUAGE?
8 Answers Carphone Warehouse, IBM, SAS,
What is enumerated data type in c?
write a program in c language for the multiplication of two matrices using pointers?
how does a general function , that accepts an array as a parameter, "knows" the size of the array ? How should it define it parameters list ?
what is diference between return 0 and return NULL??
write a program to convert a expression in polish notation (postfix) to inline (normal)
what is differnence b/w macro & functions
How can you dynamically allocate memory in C?
Tell me what is null pointer in c?