Lol, Python

  • -1
    class Solution(object):
        def rotateRight(self, head, k):
            if head:
                arr = self.list_to_array(head)
                k = k % len(arr)
                return arr[-k:] + arr[:-k]
            return None
        def list_to_array(self, head):
            result = []
            while head:
                head =
            return result

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.