#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2013
    Posts
    1
    Rep Power
    0

    Ascending order of corresponding numbers, not lexicographic.


    Please help me.. i need c language program.. plz help me.. tomorrow is my interview..
    Suppose numbers are represented by strings,
    eg. "117823" is "one one seven eight two three".
    We provide positive numbers in this string format, separated by newline,
    followed by "nil" as the terminator.
    Please sort and output in ascending order, again followed by "nil" as the
    terminator. (Ascending order of corresponding numbers, not lexicographic.)
    Sample Input
    six one six
    one zero zero
    seven seven seven
    zero one
    nil
    Sample Output
    1
    100
    616
    777
    Nil
  2. #2
  3. No Profile Picture
    I haz teh codez!
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Dec 2003
    Posts
    2,547
    Rep Power
    2337
    If you can't answer the interview question, you shouldn't get the job! What makes you the people of this board, most of whom are professionals, would give you a program allowing you to get a job for which you're not qualified? Do you think we want you getting hired by our company, sitting next to us and asking us to do your work for you when we have our own to do?

    Comments on this post

    • jakotheshadows agrees : I'm not a professional yet, but when my time comes for an interview I shouldn't miss out on an opportunity because someone successfully "cheated" on their interview questions.
    I ♥ ManiacDan & requinix

    This is a sig, and not necessarily a comment on the OP:
    Please don't be a help vampire!

IMN logo majestic logo threadwatch logo seochat tools logo