Skip to content

Commit cdd5cf9

Browse files
committed
✨ lc 436-1
1 parent cb336ed commit cdd5cf9

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

0436_Problem_1.bqn

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# For up to date code:
2+
# https://github.com/codereport/bqn-code/blob/main/leetcode/436-1.bqn
3+
4+
# Link: https://leetcode.com/problems/sort-matrix-by-diagonals
5+
6+
u•Import "/home/cph/bqn-test/test.bqn"
7+
8+
SortMatrix¨(¨((2÷˜))+´≢⊔⌽˘)
9+
10+
# Tests
11+
u.UnitTest (SortMatrix >⟨⟨1,7,3⟩,⟨9,8,2⟩,⟨4,5,6⟩⟩) >⟨⟨8,2,3⟩,⟨9,6,7⟩,⟨4,5,1⟩⟩
12+
u.UnitTest (SortMatrix >⟨⟨0,1⟩,⟨1,2⟩⟩) >⟨⟨2,1⟩,⟨1,0⟩⟩
13+
u.UnitTest (SortMatrix >⟨⟨1⟩⟩) >⟨⟨1⟩⟩

0 commit comments

Comments
 (0)