Question: Aswer in python with explanations/comments. Answer question 13 and 15 Implement a function, with calling syntax max(L), that returns the maximum element from a PositionalList

Aswer in python with explanations/comments. Answer question 13 and 15

Implement a function, with calling syntax max(L), that returns the maximum

element from a PositionalList instance L containing comparable

elements.

Redo the previously problem with max as a method of the PositionalList

class, so that calling syntax L.max( ) is supported.

13. (This is the question to answer) Update the PositionalList class to support an additional method find(e),

which returns the position of the (first occurrence of ) element e in the list

(or None if not found)

Repeat the previous process using recursion. Your method should not

contain any loops. How much space does your method use in addition to

the space used for L?

15.(Question to be answer) Provide support for a reversed method of the PositionalList class that is similar to the given iter , but that iterates the elements in reversed order.

The positional list is: 15, 22, 25, 29, 36, 23, 53, 11, 42

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!