Question: write a pseudocode algortihm that returms the average of the elements in a stack. Also,give the Big O notation of your algorithm. For example given

write a pseudocode algortihm that returms the average of the elements in a stack. Also,give the Big O notation of your algorithm. For example given the stack with contents top ->[2,4,5,1,3] would return 3. The method signature should be calculate_average(Stack List)=> float.

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 Programming Questions!