code-chronicles-code / code-chronicles-code/leetcode-curriculum
Add a `transpose` Java goody
Đang mở
enhancement
java
- Ngôn ngữ chính
- TypeScript
- Star
- 20
- Fork
- 12
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
I'm thinking it would be neat to make this "lazy", i.e. have it backed by the same data as the original.
A possible API:
```java
int[][] matrix = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}};
List> transposedMatrix = transpose(matrix);
System.out.println(transposedMatrix); // should print [[1, 4, 7], [2, 5, 8], [3, 6, 9]]
```
The implementation could use the `VirtualList` goody to achieve this effect.
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.