Programming/[Codility]알고리즘_Python
Codility Lesson 2 - CyclicRotation
https://app.codility.com/programmers/lessons/2-arrays/ 2. Arrays lesson - Learn to Code - Codility Rotate an array to the right by a given number of steps. app.codility.com def solution(A, K): N=len(A) if N =N: K = K%N return A[N-K:]+A[:N-K] A = [3, 8, 9, 7, 6] K = 3 solution(A, K)
2022. 3. 26. 22:28
최근댓글