Question: Please answer according to python 3 Remove all occurrences 1. Write a function remove_all in Python that takes in an integer list (not necessarily sorted)

Please answer according to python
3 Remove all occurrences 1. Write a function remove_all in Python that takes in an integer list (not necessarily sorted) and an integer x. The function should remove all occurrences of integer x from the list. [4 marks] Note: Do not return anything from the function, make all changes in the same list. The extra space required by your program should not exceed O(1). The final order of other elements does not matter. 2. Analyse the time complexity of your program. For full marks, the time complexity should be O(n), where n is the length of the list. Remember that list.pop() takes O(1) time, but list.pop(k) might not. [3 marks]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
