Question: Q1: (4 + 6) i. Write a function that take user input as 0 and 1. If 0 is entered by the user, it deletes

Q1: (4 + 6) i. Write a function that take user input as 0 and 1. If 0 is entered by the user, it deletes all even positioned nodes from a linked list otherwise it deletes all odd positioned nodes. Last node should also be deleted if its position is even. ii. Consider a game named as FootBall", where the players having top n goals are saved in an array of size n. Each player has a unique ID as key and the nick name. Design a function that should search whether a particular player falls among top n players or not. To mention, the runtime of the above-mentioned function must be less than O(n). Hint: You can use any data structure taught and practiced in class and lab and don't forget to mention your assumption(s) in comments clearly
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
