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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!