Question: Suppose s = { 1 , 2 , 4 , 3 } . What happens when invoking s . add ( 4 ) ? q
Suppose What happens when invoking sadd
You cannot add an element from a set.
This method is executed fine and is added to the set.
This method is executed fine and is not added to the set since is already in the set.
There is no add method for a set object.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
