how to impliment 2 or more stacks in a single dimensional
array ?
Answer Posted / 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 |
Post New Answer View All Answers
Explain what is operator promotion?
Why can't I perform arithmetic on a void* pointer?
Explain how does flowchart help in writing a program?
what is a NULL Pointer? Whether it is same as an uninitialized pointer?
What are the basic data types associated with c?
What is the use of volatile?
What are the advantages of union?
What are terms in math?
How to check whether string is a palindrome, WITHOUT USING STRING FUNCTIONS?
How can I manipulate strings of multibyte characters?
How many keywords are there in c?
What is the code for 3 questions and answer check in VisualBasic.Net?
An application package has been provided to you without any documents for the following application. The application needs to be tested. How will you proceed?
Why main function is special give two reasons?
How to write a code for reverse of string without using string functions?