Skip to content

Commit fc7f824

Browse files
committed
✨ lc b153-1
1 parent f1de19e commit fc7f824

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

B0153_Problem_1.bqn

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# For up to date code:
2+
# https://github.com/codereport/bqn-code/blob/main/leetcode/b153-1.bqn
3+
4+
# Link: https://leetcode.com/problems/reverse-degree-of-a-string
5+
6+
u•Import "/home/cph/bqn-test/test.bqn"
7+
8+
ReversedDegree ← { +´(≠×(1+))𝕩˜'a'+↕26 } # Explicit
9+
ReversedDegree2+´·(≠×(1+))('a'+↕26) # Tacit
10+
11+
# Tests
12+
u.UnitTest (ReversedDegree "abc") 148
13+
u.UnitTest (ReversedDegree "zaza") 160
14+
u.UnitTest (ReversedDegree2 "abc") 148
15+
u.UnitTest (ReversedDegree2 "zaza") 160

0 commit comments

Comments
 (0)