diff options
| author | Adam Russell <ac.russell@live.com> | 2022-01-02 18:21:40 -0500 |
|---|---|---|
| committer | Adam Russell <ac.russell@live.com> | 2022-01-02 18:21:40 -0500 |
| commit | 9862f6da22f854ccdfd4a36cbe50f69b72266856 (patch) | |
| tree | 90c0e6ae131929016937a73212197f318e5ccbbc | |
| parent | b1d244ba716a5e5311c8071967619dec40e4074f (diff) | |
| download | perlweeklychallenge-club-9862f6da22f854ccdfd4a36cbe50f69b72266856.tar.gz perlweeklychallenge-club-9862f6da22f854ccdfd4a36cbe50f69b72266856.tar.bz2 perlweeklychallenge-club-9862f6da22f854ccdfd4a36cbe50f69b72266856.zip | |
cleaned up submission, didn't have time this week to do more.
| -rw-r--r-- | challenge-145/adam-russell/blog.txt | 0 | ||||
| -rw-r--r-- | challenge-145/adam-russell/blog1.txt | 0 | ||||
| -rw-r--r-- | challenge-145/adam-russell/cxx/ch-2.cxx | 0 | ||||
| -rw-r--r-- | challenge-145/adam-russell/perl/ch-2.pl | 68 | ||||
| -rw-r--r-- | challenge-145/adam-russell/prolog/ch-2.p | 0 |
5 files changed, 0 insertions, 68 deletions
diff --git a/challenge-145/adam-russell/blog.txt b/challenge-145/adam-russell/blog.txt deleted file mode 100644 index e69de29bb2..0000000000 --- a/challenge-145/adam-russell/blog.txt +++ /dev/null diff --git a/challenge-145/adam-russell/blog1.txt b/challenge-145/adam-russell/blog1.txt deleted file mode 100644 index e69de29bb2..0000000000 --- a/challenge-145/adam-russell/blog1.txt +++ /dev/null diff --git a/challenge-145/adam-russell/cxx/ch-2.cxx b/challenge-145/adam-russell/cxx/ch-2.cxx deleted file mode 100644 index e69de29bb2..0000000000 --- a/challenge-145/adam-russell/cxx/ch-2.cxx +++ /dev/null diff --git a/challenge-145/adam-russell/perl/ch-2.pl b/challenge-145/adam-russell/perl/ch-2.pl deleted file mode 100644 index 9f8ba48a44..0000000000 --- a/challenge-145/adam-russell/perl/ch-2.pl +++ /dev/null @@ -1,68 +0,0 @@ -use strict; -use warnings; -## -# You are given a string $s. -# Write a script to create a Palindromic Tree for $s. -## -use Graph; -use boolean; -use Graph::Easy::Parser; - -use constant EMPTY => 0; -use constant IMAGINARY => -1; - -package EerTreeVertex{ - use Class::Struct; - struct( - start => q/$/, - end => q/$/, - length => q/$/, - suffix => q/EerTreeVertex/, - labelled => q/@/ - ); -} - -sub initialize{ - my $graph = new Graph(refvertexed => true); - my $root_empty = new EerTreeVertex( - length => EMPTY - ); - my $root_imaginary = new EerTreeVertex( - length => IMAGINARY - ); - $graph->add_edge($root_empty, $root_imaginary); - $graph->add_edge($root_imaginary, $root_imaginary); - return $graph; -} - -sub build_tree{ - my($s) = @_; - my @letters = split(//, $s); - my $eertree = initialize; - - return $eertree; -} - -sub eertree{ - my($s) = @_; - return build_tree($s); -} - -sub display_graph{ - my($graph) = @_; - my $s = $graph->stringify(); - my @s = split(/,/, $s); - my @lines; - for my $n (@s){ - my @a = split(/-/, $n); - push @lines, "[ $a[0] ] => [ ]" if @a == 1; - push @lines, "[ $a[0] ] => [ $a[1] ]" if @a > 1; - } - my $parser = new Graph::Easy::Parser(); - my $graph_viz = $parser->from_text(join("", @lines)); - print $graph_viz->as_ascii(); -} - -MAIN:{ - print eertree("redivider"); -}
\ No newline at end of file diff --git a/challenge-145/adam-russell/prolog/ch-2.p b/challenge-145/adam-russell/prolog/ch-2.p deleted file mode 100644 index e69de29bb2..0000000000 --- a/challenge-145/adam-russell/prolog/ch-2.p +++ /dev/null |
