79080629

Date: 2024-10-12 09:10:40
Score: 1
Natty:
Report link

Earlier provided solution is returning [7, 6, 3, 8, 9] whereas expected is [9, 7, 6, 3, 8]. Seems like logic is not working well. Here is the correct working code:

def solution(A, K):
K = (K % len(A))
return A[len(A) - K:] + A[:len(A) - K]
pass

Reasons:
  • Whitelisted phrase (-1): solution is
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Ashish Jain