• ###### KenKamaucommented on "Prefix Permutation" kata

Added random tests. Guess work solutions killed.

• ###### RaviKotapaticommented on "Prefix Permutation" kata

where is the solution?

• ###### soulmonkcreated a suggestion for "Prefix Permutation" kata

I think must be test case like `[-5,-3,-2,-4,-1] equal 3`

Approved

• ###### Voileresolved an issue on "Prefix Permutation" kata

Added a few fixed tests that will catch them.

• ###### Voileresolved an issue on "Prefix Permutation" kata

You know, you can always add `if(arr.length < x)` in your printing code ;-)

Fixed

• ###### dinglemousecreated an issue for "Prefix Permutation" kata

Typo in Java Sample test - wrong number params to prefix

`assertEquals(PrefixPermutation.prefix(3, new int[]{2, 1, 3, 5, 4}));`

• ###### CLeJ37created a suggestion for "Prefix Permutation" kata

Please, add details on the assumptions about the input array such as it containing only positive integers, without repetition, or add some tests.

Also precise input array could be large.

• ###### CLeJ37commented on "Prefix Permutation" kata

I agree, some solutions return `1` for `[2, 2, 2]`...

• ###### medmelkiresolved a suggestion on "Prefix Permutation" kata

Thank you for the comment. I have considered that.

Edited!

• ###### JohanWiltinkcreated a suggestion for "Prefix Permutation" kata

Could do with a `performance` tag.

My perfectly servicable solution chokes on `50000` element arrays.

• ###### ZozoFouchtracreated a suggestion for "Prefix Permutation" kata

To me the harder part to understand was how your example worked. May be a more detailled example would help other non-mathy-coders like me :

``````if given sequence is [2,1,3,5,4], then ...
[2]         is a NOT a permuation of [1]
[2,1]       IS a permutation of [1,2]
[2,1,3]     IS a permutation of [1,2,3]
[2,1,3,5]   is NOT a permutation of [1,2,3,4]
[2,1,3,5,4] IS a permutation of [1,2,3,4,5]

...and there are 3 prefix permutations
``````

; ) )

• ###### Blind4Basicscreated an issue for "Prefix Permutation" kata

Interesting one.

But you have to provide some fixed tests OF REASONABLE SIZE, in which you print the array to the console so that the warrior can debug is code. Currently, you use arrays that are too long to be displayed in the console. Note that you have to do the printing because if the warrior does it in his code, the big tests will be displayed too and that will provoque a failure.