Answered step by step
Verified Expert Solution
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++
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 experiencingStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started