-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Open
Description
Bug Report for https://neetcode.io/problems/transpose-matrix
Please describe the bug below and include any steps to reproduce the bug or screenshots if possible.
The function accepts List[List[int]], but the following passes:
class Solution:
def transpose(self, matrix: List[List[int]]) -> List[List[int]]:
return list(zip(*matrix))
This solution actually turns each row in the new matrix into a tuple, which is not expected. Perhaps the return type of each sublist should be verified.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels