6 kyu
Shuffle It Up II
74 of 80raulbc777
Loading description...
Algorithms
Performance
Number Theory
Recursion
Fundamentals
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
Very nice katas to learn something new about math, coding and programming in general, thanks.
Python 3.11 fork
Sets Integer string conversion length limitation to 20000
Forked & Approved, honor points go to you.
"We have an integer array with unique elements and we want to do the permutations that have an element fixed, "
What does it mean to "do the permutations"? I feel like this is poor wording.
It's a bit confusing, since it's not
permutations
we need, butderangements
with fixed points.this should have been 4kyu atleast :D
Something I can't understand…
As a sample for permutations of an array of 4 with fixed position at index 0, you give:
But what about (1, 2, 4, 3), (1, 3, 2, 4) and (1, 4, 3, 2)?
I had the same question. But it seems this kata requires to count permutations that have exactly k fixed points. In the case of (1, 3, 2, 4), position of elements 1 and 4 are fixed. This is permutations with two fixed points.
Ouch! Subtle… Many thanks :)
This comment has been hidden.
Great, thanks for this insight! :)
This comment has been hidden.
Thanks.Recursion stack depth amplified. I extend the limit for n and k up to 9.000 to do have it a bit more challenging.
.