We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Absolute Permutation
Absolute Permutation
Sort by
recency
|
539 Discussions
|
Please Login in order to post a comment
solution in javascript:
So, I initially used list.contains which creates a problem regarding time complexity(O(N2)). Then, chatGPT suggested to use another means of checking if it's used or not..But the logic works and is originally mine.
Here is problem solution in python java c++ c and Javascript - https://programmingoneonone.com/hackerrank-absolute-permutation-problem-solution.html
Hi everybody, With n =10 and k = 1, i obtain 2 3 4 5 6 7 8 9 10 9 but the expected output is 2 1 4 3 6 5 8 7 10 9
Does somebody could explain why my output is not considered as a good answer ?
Thanks