N
N
Nikolay Semenov2016-12-09 15:39:13
.NET
Nikolay Semenov, 2016-12-09 15:39:13

How to correctly understand c# test task, part two?

Guys, one more clarification on the test
it has the following paragraph:
The name of the input, output file, sorting mode, as well as the content type are set at
startup through command line arguments. Windows command line examples:
sort-it.exe in.txt out.txt -i -a (for integers in ascending order)
sort-it.exe in.txt out.txt -i -d (for integers in ascending order) descending)
sort-it.exe in.txt out.txt -s -a (for strings in ascending order)
and there is also this:
The result of the program should be a new file with the contents of the input file
sorted in ascending or descending order. To sort strings, use
lexicographic order (by character codes).
Attention! Question! why would I need to know about content types if they are going to be sorted by character code value? I will split the string into an array and compare as strings.
I can compare by codes and letters with numbers? or I don't understand something?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artyom Tokarevsky, 2016-12-09
@nickola105

If you compare numbers lexicographically, you will put 100 before 90

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question