خرید بک لینک

Vote count: 0

Basic problem: To print numbers from 1-999 in words.

Print number in words

One of my friend told me this problem in above link was asked to him as a interview question. The best solution i can think of is given in the link itself. But while my friend was being interviewed, the interviewer wasn't satisfied with the answer. I have been thinking about this problem for quite some time, and wasn't able to deduce a way to reduce the number of strings used in this algorithm or optimize it more. At minimum there can be 27 strings, if the numbers we have to print are from 1-999. I am not sure that if he wanted to reduce the number of strings or just optimize it more, and the solution my friend gave matches to the answer given in the link. Or is there anything else wrong in the problem which i am not able to notice.

asked 47 secs ago

برچسب: نویسنده: استخدام کار تاريخ: شنبه 29 خرداد 1395 ساعت: 18:29

صفحه بندی