This is Pushpendra Gupta, work as software developer my objective is provide technical solution which can useful for developer to understand basic and advance concepts.
What would happen if the list is empty or has only one element? It is not recommended to use get() on optional. Better to use ifPresentOrElse, orElseThrow...
I understood some points that if we don't override hashCode() then an ambiguity arises because of which the Key's hash values won't be considered and hence all the 4 values was added into the HashMap even though the keys was duplicated.
@@siva7083 actually I hardly get time... I will not able to teach you.. But definitely I can assist you... You can find my email in about section of my channel.. Please email me... We will get in touch 😊