Browse Source

subject argsort

pull/1622/head
zainabdnaya 2 years ago committed by José Rosendo
parent
commit
a9aefbd204
  1. 17
      subjects/argsort/README.md

17
subjects/argsort/README.md

@ -1,30 +1,27 @@
## argsort ## argsort
### Instruction ### Instructions
Write a program where you define if an argument is sorted or not sorted: Write a program where you define if an argument is sorted or not sorted:
- Your Program should return T if an argument is sorted. - Your Program should return `T` if an argument is sorted.
- Your Program should return F if an argument is not sorted. - Your Program should return `F` if an argument is not sorted.
- If The argument is empty nothing will be printed. - If The argument is empty nothing will be printed.
- If the number of arguments is not `1` Print nothing. - If the number of arguments is not 1 Print (`'\n'`).
- If the length argument is equal to `1` Print nothing. - If the length argument is equal to 1 Print(`'\n'`).
- Your program should always print `('\n') `at the end of the output. - Your program should always print (`'\n'`) at the end of the output.
### Usage ### Usage
And it's output should be: And it's output should be:
```console ```console
$ go run . | cat -e $ go run .
$
$ go run . a | cat -e $ go run . a | cat -e
$
$ go run . " 5ABc" | cat -e $ go run . " 5ABc" | cat -e
T$ T$
$ go run . "zA1" | cat -e $ go run . "zA1" | cat -e
F$ F$
$ go run . "01Talent" "student" | cat -e $ go run . "01Talent" "student" | cat -e
$
$ go run . "Hello World" | cat -e $ go run . "Hello World" | cat -e
F$ F$
$ go run . "a b c" | cat -e $ go run . "a b c" | cat -e

Loading…
Cancel
Save