Find Jobs
Hire Freelancers

C++ template for a linked-list implementation of a stack

$30-250 USD

In Progress
Posted over 12 years ago

$30-250 USD

Paid on delivery
What to submit: For each program, you should discuss briefly how you designed it. This may be done by providing a simple piece of pseudo-code, and/or describe your considerations, concerns, and the problems that you have encountered during coding and debugging. For each program, you should turn in a hard-copy (i.e., printed version) of your code (including the discussion) during class. Also, in each program, you should include appropriate comment lines to describe the source code. Missing discussions and/or comment lines in the program will result in a deduction on your grade for this assignment. Plagiarism: If two or more submitted projects are identical, except for some minor variations, then a score of zero will be assigned to all identical projects. 1. Write a class template for a linked-list implementation of a stack. The Stack class must have the same function prototypes as the ones used in page 15 of Lecture 8, but with four additional functions: destructor, copy constructor, overloaded assignment operator, and deepCopy. The private section shall only have one data member: a pointer called top. Be sure to have the pointer of the last node (at the bottom of the stack) set to NULL at all times. (This condition wasn't necessary in the linked-list implementation of the queue, because the back pointer signified the last node but it is generally necessary in linked lists). At the top of the class implementation file, include iostream (important because NULL is defined here) and use the std namespace. 2. Your task in this problem is to evaluate the performance of the vector and list containers of STL for various operations (use integer values). In particular, you will measure the CPU time required for each container to perform the following operations: (i) Insert all the integers from 0 to 999,999 (one by one) into the back of the container. (ii) Find the element with value 100,000 and place an iterator to point to that element (you have to manually find the element even for the vector container). (iii) Erase the element found in part (ii), using the erase function. For each of the three tasks, output on the screen the CPU time (in seconds) required to complete the task for the two different containers. In particular, perform each experiment 100 times, and output the average times (don't forget to clear the containers before each run). Comment on the results and also include a screenshot of the output in your report. To measure CPU time in C++, do the following: (i) Define: time_t start,stop; (ii) Just before the series of statements for which you want to measure the CPU time put: start=clock(); (iii) After the aforementioned statements put: stop=clock(); (iv) The CPU time in seconds is: double(stop-start)/CLOCKS_PER_SEC
Project ID: 1273582

About the project

7 proposals
Remote project
Active 12 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
Dear,sir. I can do it right now. Regards.
$30 USD in 1 day
3.3 (47 reviews)
5.3
5.3
7 freelancers are bidding on average $58 USD for this job
User Avatar
Please check PMB.
$80 USD in 2 days
4.6 (35 reviews)
5.3
5.3
User Avatar
Hello. I can help you with stack implementation.
$65 USD in 1 day
5.0 (9 reviews)
4.4
4.4
User Avatar
Hi, I am a graduate in CS and working as a programmer in c++ platform. I have implemented several STL containers manually, so this job best fits with my expertise. I assure you of quality product with clear,simple and efficient code, proper comment and documentation. ready to start, thanks
$70 USD in 1 day
3.9 (8 reviews)
3.7
3.7
User Avatar
Hello please check your PMB. Greetz
$60 USD in 2 days
5.0 (1 review)
2.0
2.0
User Avatar
Simple problem, can be done quickly. Will provide psuedocode, explanations and reasoning behind design for brief discussion.
$50 USD in 1 day
0.0 (0 reviews)
0.0
0.0
User Avatar
24 hrs or less and you'll have your program ready
$50 USD in 1 day
0.0 (0 reviews)
0.0
0.0
User Avatar
Ready to help you. I have already successfully completed this assignment some years ago when I was at school ;)
$50 USD in 1 day
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED STATES
New York, United States
4.7
8
Payment method verified
Member since Sep 16, 2011

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759) & Freelancer Online India Private Limited (CIN U93000HR2011FTC043854)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.