Objective/Restrictions:
May only be answered with programming language that has function syntax (or procedure, method, lambda, macro, statement grouping and labelling) .
Create a function with at least 2 argument/parameter, that generates an array containing 7 random strings, each string contains 3 characters, string may only contain alphanumeric characters
[a-zA-Z0-9]
. The number 7 and 3 passed into the functionCreate a function that sort those strings using in special alphabetical ascending order: number first, alphabet later (lower-case then upper-case), for example:
1aa 2ac aab abc Aab bAA BZ2
Create a function to print each string in descending order from the last one to the first one without mutating the ascending ordered array.
Call all three function and produce the correct output
Shortest code wins!
Note: if possible, give the ideone or any other online compiler link to test the correctness.
-1
, and now-2
? \$\endgroup\$ – Kokizzu Jan 27 '15 at 12:52-5
now.. \$\endgroup\$ – Kokizzu Jan 29 '15 at 12:31