1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
# Solutions by Asbigail
## [Locate Memory](https://perlweeklychallenge.org/blog/perl-weekly-challenge-108/#TASK1)
Write a script to declare a variable or constant and print it's
location in the memory.
### Solutions
* [C](c/ch-1.c)
* [Fortran](fortran/ch-1.f90)
* [Go](go/ch-1.go)
* [Pascal](pascal/ch-1.p)
* [Perl](perl/ch-1.pl)
* [Python](python/ch-1.py)
* [R](r/ch-1.r)
* [Ruby](ruby/ch-1.rb)
### Blog
[Locate Memory](https://abigail.github.io/HTML/Perl-Weekly-Challenge/week-108-1.html)
## [Bell Numbers](https://perlweeklychallenge.org/blog/perl-weekly-challenge-108/#TASK2)
Write a script to display top 10 Bell Numbers. Please refer to
[wikipedia page](https://en.wikipedia.org/wiki/Bell_number) for
more informations.
### Example
* `B_0 = 1`, as you can only have one partition of zero element set
* `B_1 = 1`, as you can only have one partition of one element set {a}.
* `B_2 = 2`, `{a}{b}`, `{a,b}`.
* `B_3 = 5`, `{a}{b}{c}`, `{a,b}{c}`, `{a}{b,c}`, `{a,c}{b}`, `{a,b,c}`.
* `B_4 = 15`, `{a}{b}{c}{d}`, `{a,b,c,d}`, `{a,b}{c,d}`, `{a,c}{b,d}`,
`{a,d}{b,c}`, `{a,b}{c}{d}`, `{a,c}{b}{d}`, `{a,d}{b}{c}`,
`{b,c}{a}{d}`, `{b,d}{a}{c}`, `{c,d}{a}{b}`, `{a}{b,c,d}`,
`{b}{a,c,d}`, `{c}{a,b,d}`, `{d}{a,b,c}`
### Solutions
* [AWK](awk/ch-2.awk)
* [Bash](bash/ch-2.sh)
* [BASIC](basic/ch-2.bas)
* [bc](bc/ch-2.bc)
* [Befunge-93][befunge-93/ch-2.bf93]
* [C](c/ch-2.c)
* [Cobol](cobol/ch-2.cb)
* [Csh](csh/ch-2.csh)
* [Erlang](erlang/ch-2.erl)
* [Forth](forth/ch-2.fs)
* [Fortran](fortran/ch-2.f90)
* [Go](go/ch-2.go)
* [Java](java/ch-2.java)
* [Lua](lua/ch-2.lua)
* [m4](m4/ch-2.m4)
* [Node.js](node/ch-2.js)
* [Ocaml](ocaml/ch-2.ml)
* [Pascal](pascal/ch-2.p)
* [Perl](perl/ch-2.pl)
* [PHP](php/ch-2.php)
* [PostScript](postscript/ch-2.ps)
* [Python](python/ch-2.py)
* [R](r/ch-2.r)
* [Rexx](rexx/ch-2.rexx)
* [Ruby](ruby/ch-2.rb)
* [Scheme](scheme/ch-2.scm)
* [sed](sed/ch-2.sed)
* [SQL](sql/ch-2.sql)
* [Tcl](tcl/ch-2.tcl)
### Blog
[Bell Numbers](https://abigail.github.io/HTML/Perl-Weekly-Challenge/week-108-2.html)
|