Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
You say to compare Y and Z in each iteration? Z is always greater than Y, so what do you mean by comparing?
Unfortunately no, hence the "Error: execution of an external program failed: '/workspace/tests '".
Nevertheless all was green because the testing function was wrongly placed.
It is fixed now and you will be able to see where your function has flaws.
I see you don't have a great practice of CW so you must know that when you post code, as you did, you have to mark your post as "Spoiler" (Red label. I did it for you). Cheers.
This comment is hidden because it contains spoiler information about the solution
In the instruction is said: Each part of the string is of the form: h|m|s where h, m, s (h for hour, m for minutes, s for seconds) are positive or null integer (represented as strings) with one or two digits. There are no traps in this format.
Here are strings that I am getting for attemps:
Log
01|15|59, 1|47|16, 01|17|20, 1|32|34, 2|17|1702|15|59, 2|47|16, 02|17|20, 2|32|34, 2|17|17, 2|22|00, 2|31|4102|15|59, 2|47|16, 02|17|20, 2|32|34, 2|32|34, 2|17|17
Can anyone says what are 2|17|1702|15|59, and 2|31|4102|15|59,? These are not in order and causing wrong results.
Thanks!
Basically there is an element after it (there can be elements equal than after it too, those are part of the plateau) that's less than it, and there was another less than it before.
How can you check if an element is peak-plateau? any role ?
Cheers
You have to somehow store a peak candidate until you can say for sure if it was a peak or a peak-plateau or disregard it if it wasn't.
it is correct, I meant in the follwing vector <1, 2, 2, 2, 1> how should I find the peak-plateau?
thanks
There's no peak there.
This comment is hidden because it contains spoiler information about the solution