Correction: upon further reading I see that there are no transposed digits but the whole text is somewhat misleading

I'd expect to have the

Python: The description and example contain two pairs of transposed digits ( 21 <-> 12)

21 <-> 12

X = [6, 9, 21]

X_1 = [6, 9, 12]

solution([6, 9, 21]) #-> 9

[6, 9, 12]

The code shown assumes the correct values

From X, X_1 is the array after the first transformation.

X

X_1

X = [6, 9, 21] after the first transformation becomes X_1 X_1 = [6, 9, 12] because X_1[2] = X[2] - X[1] = 21 - 9 = 12

For instance, the successive transformation of the elements of input X = [6, 9, 21] is detailed below:

X_1 = [6, 9, 12] # -> X_1[2] = X[2] - X[1] = 21 - 9

I don't understand where 21 came from? X = [6,9,21]

X_1 = [6,9,12] should 12 be 21 in this case?

Nice kata! Just a small tip: compare the result array and the original array and try to find a pattern. Good luck to future challengers!

ok thanks

100 random tests (97 of 97 Assertions)

It passed all the tests until it timed out. There are 209 tests in Python.

Timed OutPassed: 106Failed: ?Exit Code: 1 Test Results: Fixed Tests Should pass example tests (9 of 9 Assertions) Random Tests 100 random tests (97 of 97 Assertions)

what is the problem it passed all exames

To pass the test, the solution should have about linear time complexity and less 600 ms 1 million values.

im pretty sure that the buffer size error is caused my you printing stuff

Incorrect test structure in Crystal: "Basic tests" are not in an it block.

it

No overflows now, but

There are performance tests consisted of very big numbers and arrays of size at least 30000.

Look at this...

I've reduced them drastically, can you still reproduce them?

Not fixed. The random tests in Crystal sometimes crash with

Arithmetic overflow /solution_spec.cr:20:16 in 'sol'

I've checked your solution and my solution around 10 times, I didn't faced any such issue anymore.

Now?

Correction: upon further reading I see that there are no transposed digits but the whole text is somewhat misleading

I'd expect to have the

and so on.

Python: The description and example contain two pairs of transposed digits (

`21 <-> 12`

)`X = [6, 9, 21]`

is detailed below:" but the code starts with`X_1 = [6, 9, 12]`

`solution([6, 9, 21]) #-> 9`

but the detailed steps start with`[6, 9, 12]`

The code shown assumes the correct values

From

`X`

,`X_1`

is the array after the first transformation.For instance, the successive transformation of the elements of input X = [6, 9, 21] is detailed below:

X_1 = [6, 9, 12] # -> X_1[2] = X[2] - X[1] = 21 - 9

I don't understand where 21 came from?

X = [6,9,21]

X_1 = [6,9,12] should 12 be 21 in this case?

Nice kata!

Just a small tip: compare the result array and the original array and try to find a pattern.

Good luck to future challengers!

ok thanks

It passed all the tests

untilit timed out. There are 209 tests in Python.Timed OutPassed: 106Failed: ?Exit Code: 1

Test Results:

Fixed Tests

Should pass example tests (9 of 9 Assertions)

Random Tests

100 random tests (97 of 97 Assertions)

what is the problem it passed all exames

To pass the test, the solution should have about linear time complexity and less 600 ms 1 million values.

im pretty sure that the buffer size error is caused my you printing stuff

Incorrect test structure in Crystal: "Basic tests" are not in an

`it`

block.No overflows now, but

Look at this...

I've reduced them drastically, can you still reproduce them?

Not fixed. The random tests in Crystal sometimes crash with

I've checked your solution and my solution around 10 times, I didn't faced any such issue anymore.

Now?

## Loading more items...