madhavi said:

Can any one help me

The number codes 3152, 3455 and 5213 stand for three of the words MISS, SHAM, MASH and HAMS. Work out the code for each of the four words.

In this example they are in order but in some question they are mentioning that they are not in order.

Please can your help me on this question

This is a logic problem. You have four words in which the letters have been replaced by numbers. The fourth code number is unknown xxxx.

MISS SHAM MASH HAMS

3152 3455 5213 xxxx

Notice that two of the words start with M and two of the numbers start with 3. That means that M = 3. The unknown cannot start with 3 because there aren't three words that start with the same letter. The unknown cannot start with 5 because there aren't two sets of words that start with the same letter. Of the two numbers that start with 3, only 3455 ends with a double number. This matches MISS. Therefore, I = 4 and S = 5. Also, MASH = 3152, so A = 1 and H =2. So, SHAM = 5213. That leaves HAMS for the unknown and that must be 2135. The final answer is:

MISS SHAM MASH HAMS

3455 5213 3152 2135