diff options
| author | aecepoglu <aecepoglu@fastmail.fm> | 2022-10-05 00:43:28 +0100 |
|---|---|---|
| committer | aecepoglu <aecepoglu@fastmail.fm> | 2022-10-05 00:48:03 +0100 |
| commit | 28a6143292d728302fb8c2a171aa6d5fbd437ec1 (patch) | |
| tree | 5852eaab4150b50c524d0130e4c91f46f06f19a1 /challenge-113 | |
| parent | c2c9d22ffcf55b02aa3a5aeda5553f5b556e81af (diff) | |
| download | perlweeklychallenge-club-28a6143292d728302fb8c2a171aa6d5fbd437ec1.tar.gz perlweeklychallenge-club-28a6143292d728302fb8c2a171aa6d5fbd437ec1.tar.bz2 perlweeklychallenge-club-28a6143292d728302fb8c2a171aa6d5fbd437ec1.zip | |
wk 101..125, 185
Diffstat (limited to 'challenge-113')
| -rw-r--r-- | challenge-113/aecepoglu/README.md | 1 | ||||
| -rw-r--r-- | challenge-113/aecepoglu/bqn/ch-1.bqn | 3 | ||||
| -rw-r--r-- | challenge-113/aecepoglu/bqn/ch-2.bqn | 6 |
3 files changed, 10 insertions, 0 deletions
diff --git a/challenge-113/aecepoglu/README.md b/challenge-113/aecepoglu/README.md new file mode 100644 index 0000000000..2f43e385e0 --- /dev/null +++ b/challenge-113/aecepoglu/README.md @@ -0,0 +1 @@ +Overdue solutions by AhmetEmre diff --git a/challenge-113/aecepoglu/bqn/ch-1.bqn b/challenge-113/aecepoglu/bqn/ch-1.bqn new file mode 100644 index 0000000000..4fefd615b6 --- /dev/null +++ b/challenge-113/aecepoglu/bqn/ch-1.bqn @@ -0,0 +1,3 @@ +# TASK 1 - represent integer +_dc←{⌽𝕗|⌊∘÷⟜𝕗⍟(↕1+·⌊𝕗⋆⁼1⌈⊢)} # digits in base +{∨´7=∾10 _dc ¨↕𝕩} 25 diff --git a/challenge-113/aecepoglu/bqn/ch-2.bqn b/challenge-113/aecepoglu/bqn/ch-2.bqn new file mode 100644 index 0000000000..6f0ee14fb1 --- /dev/null +++ b/challenge-113/aecepoglu/bqn/ch-2.bqn @@ -0,0 +1,6 @@ +# TASK 2 - recreate binary tree +# we would (could) represent a tree in array form and do this rather easily +# but to show the task some respect, we'll build our tree using arrays of len 3 +t←⟨1,⟨2, ⟨4, ⟨⟩, ⟨7, ⟨⟩, ⟨⟩⟩⟩, ⟨⟩⟩, ⟨3, ⟨5, ⟨⟩, ⟨⟩⟩, ⟨6, ⟨⟩, ⟨⟩⟩⟩⟩ +a←{𝕊⟨⟩:⟨⟩; 𝕊 h‿l‿r: h∾´𝕊¨l‿r} t +{{𝕩(+´≠/⊢)a}} {𝕨𝕊⟨⟩:⟨⟩;𝕨𝕊 h‿l‿r: (𝕎h)‿(𝕨𝕊l)‿(𝕨𝕊r)}t |
