# Solutions by Abigail ## [Binary Palindrome](https://perlweeklychallenge.org/blog/perl-weekly-challenge-118/#TASK1) > You are given a positive integer $N. > > Write a script to find out if the binary representation of the given > integer is Palindrome. Print 1 if it is otherwise 0. > ### Examples ~~~~ Input: $N = 5 Output: 1 as binary representation of 5 is 101 which is Palindrome. Input: $N = 4 Output: 0 as binary representation of 4 is 100 which is NOT Palindrome. ~~~~ ### Solutions * [AWK](awk/ch-1.awk) * [Bash](bash/ch-1.sh) * [C](c/ch-1.c) * [Go](go/ch-1.go) * [Java](java/ch-1.java) * [Lua](lua/ch-1.lua) * [Node.js](node/ch-1.js) * [Perl](perl/ch-1.pl) * [Python](python/ch-1.py) * [Ruby](ruby/ch-1.rb) ### Blog [Binary Palindrome](https://abigail.github.io/HTML/Perl-Weekly-Challenge/week-118-1.html) ## [Adventure of Knight](https://perlweeklychallenge.org/blog/perl-weekly-challenge-118/#TASK2) > A knight is restricted to move on an 8x8 chessboard. The knight is denoted > by `N` and its way of movement is the same as what it is defined in Chess. > `*` represents an empty square. `x` represents a square with treasure. > > > The Knight's movement is unique. It may move two squares vertically and > > one square horizontally, or two squares horizontally and one square > > vertically (with both forming the shape of an L). > > There are 6 squares with treasures. > > Write a script to find the path such that Knight can capture all > treasures. The Knight can start from the top-left square. > ~~~~ a b c d e f g h 8 N * * * * * * * 8 7 * * * * * * * * 7 6 * * * * x * * * 6 5 * * * * * * * * 5 4 * * x * * * * * 4 3 * x * * * * * * 3 2 x x * * * * * * 2 1 * x * * * * * * 1 a b c d e f g h ~~~~ ### 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-1.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] * [Tcl](tcl/ch-2.tcl] ### Blog [Adventure of Knight](https://abigail.github.io/HTML/Perl-Weekly-Challenge/week-118-2.html)