Show Bid Request
We have to implement a stack using an array that is implemented dynamically at run time. The program should be able to work so that it can use any data type
Bid Request Id: 5687
|
|
|
Description:
You are to implement a stack using arrays. The array should be implemented dynamically at run time. The concept of dynamic arrays enables the programmer to implement algorithms independently of the length of the arrays used. The index ranges of dynamic arrays are not to be defined until run-time. Stacks have various applications like evaluation of expressions, reversing a string, etc. In each of these applications,there can be a situation when you don't know the number of elements that need to be pushed into the stack. In such cases, the array needs to be created dynamically.
You are to push and pop items into a stack. Then, traverse and finally delete the stack. Your ADT should implement the stack using dynamic arrays, and it should work for any datatype even if it is tested using a particular datatype.The data file may contain only character strings to be inserted in the stack, but define your ADT such that it works for items of any data type.
You will be given sentences, and will be required to push each character of the sentence into a stack. The number of characters in the string will be known at run-time, when the data is read from the data file. The first thing you need to do is to create an empty stack. Then push the items into the stack, which is to be implemented as a dynamic array. The required memory block will have to be allocated at run-time, using malloc. A push operation would mean to increase the array size and add items at the top of the stack. Popping an item would mean to physically delete the item from the stack, and decrease the size of the array. Finally, delete the stack and free the memory block that was allocated for the stack.
The data file that was given to us is as follows: push this is thefirstline pop 4 push this is the nextline pop 21 print push good luck push this is the last assignment for the semester pop 15 print delete_stack
Deliverables: Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. Complete copyrights to all work purchased.
Special Conditions / Other:
This must be completed bye Saturday December 1 at midgnight.
Remember that contacting the other party outside of the site (by email, phone, etc.) on all business projects < $500 (before the buyer's money is escrowed) is a violation of both the software buyer and seller agreements.
We monitor all site activity for such violations and can instantly expel transgressers on the spot, so we thank you in advance for your cooperation.
If you notice a violation please help out the site and report it. Thanks for your help.
|
|
Bidding/Comments:
|
All monetary amounts on the site are in United States dollars.
Rent a Coder is a closed auction, so coders can only see their own bids and comments. Buyers can view every posting made on their bid requests. |
See all rejected bids (and all comments)
Name |
Bid Amount |
Date |
Coder Rating |
|
|
This bid was accepted by the buyer!
|
$30 (USD)
|
Nov 29, 2001 10:39:19 AM EDT
|
9.83
(Excellent)
|
|
|
This is very easy task for me. I've already done it. I'll do it in a day. |
|
|
|
|
|