Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please do in C++ 8. [20 points] An online retail shopping outlet (Sephora) hired a satellite coding team with questionable data structure proficiency to implement

please do in C++

image text in transcribed

8. [20 points] An online retail shopping outlet (Sephora) hired a satellite coding team with questionable data structure proficiency to implement their "shopping cart". The shopping cart was modeled using a Linked List. When Sephora deployed their portal, they discovered a serious problem. If a customer adds an item to cart, the cart actually ends up adding two of those items, and eventually bills the customer for two items. For example, if a customer adds one bottle of perfume to cart, the portal instead adds two bottles of perfumes. Upon closer inspection, it turns out that the portal creates two separate chunks for each item added to cart. As an example, if a customer picked item number 3, 5, 7 from a Sephora menu, the cart internally looks like: head-->3--3--5-5--7--7->NULL. The cart should instead loo something like: head-->3-->5-->7-->NULL To solve this problem, write a function that removes alternate nodes from a linked list void removeEveryOtherNode) When this function gets called, it deletes every other nod Dssentially, it renders the cart devoid of the duplicates that Sephora is experiencing

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Lab Manual For Database Development

Authors: Rachelle Reese

1st Custom Edition

1256741736, 978-1256741732

More Books

Students also viewed these Databases questions

Question

8. Demonstrate aspects of assessing group performance

Answered: 1 week ago