3 ms·
Found something weird with codes posted in the links. I am getting different outputs for the intermediate and the final codes for the input of "5; 1,2,3,4,4". C
by indweller 8y ago
Found something weird with codes posted in the links. I am getting different outputs for the intermediate and the final codes for the input of "5; 1,2,3,4,4". Can someone help?
1. https://imgur.com/a/u8O65AF https://imgur.com/a/u8O65AF
2. https://imgur.com/a/uHniZof https://imgur.com/a/uHniZof
- acqq 8y agoIs the input valid per definition of the problem?
- Yxogenium 8y ago> Starting from an array A that has n distinct integers I don't know in what ways they are differents, but these programs were not designed to work with duplicates in the input. This probably explains the results.
- indweller 8y agoYeah you're right
- indweller 8y agoGot it. The input is not valid for the problem.