find the smallest +ve mathematical number which is spelled in an alphabetical order
Answers (2)
Create a string array with following strings:
ONE, TWO, THREE,... TEN
ELEVEN, TWELVE,... TWENTY
THIRTY, FORTY,... HUNDRED
THOUSAND
LAKH
CRORE
now traverse the array in this order and check for every string element, if the string is in alphabetical order or not.
If it is, then it is the solution else move to next string.
The first string found is the solution. We have reduced the solution to this subset of all possible numbers because any other number will be a combination of these words which will be greater than the actual number.
The answer you will get will be FORTY
i think its clear check out the numbers which are in alphabetical order
for example one- it is not in alphabetical order
so i think u are clear now. search for the number which is in alphabetical order