Question: A postal - code ( zipcode ) in the country SUA has the format DD , where each is an upper - case letter of

A postal-code (zipcode) in the country SUA has the format
DD, where each is an upper-case letter of the English alphabet
and each D is a decimal digit; for example, P X 20 is one such code.
Let each array element in A[1],..., A[n] be a string that contains the
SUA-postal-code of the destination of a letter that SUA postal service
has to deliver. A government agency that I cannot name is interested
in screening for suspicious letters. In particular, they would like
to know if any two of the letters corresponding to A[1],..., A[n] have
destinations with identical postal-code (i.e. if there are any duplicates
in the n postal-codes). Design an O(n) time algorithm for the problem.
It is enough if you clearly state the steps along with any relevant details

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!