April 2020 Archives

PWC 057: Task #1, Invert Tree & Task #2, Shortest Unique Prefix

PWC Task #1, Invert Tree

jaredor submission for Task #1

The problem is in two parts, flipping the tree and pretty-printing it.

The flipping part is pretty easy, but since I'm a huge fan of Higher Order Perl I thought I should at least try to make it sort of like the tree walking code I remembered reading,…

PWC 056: Task #1, Diff-K & Task #2, Path Sum

After posting two separate blogs for PWC 055 and seeing how awkward the explanations were, I'll try a new tack: Both submissions will be elaborated in one blog post. The elaborations will not be explanations. I'll focus more on the "idea" part and let any programming details come out in the comments, if at all.

PWC Task #1, Diff-K

jaredor submission for Task #1

PWC 055, Task #2: Wave Array

This blog post contains the "missing comments" from my contribution to the Perl Weekly Challenge 055. If you haven't read the Task #2 Problem Description: Wave Array you might want to do that first.

My submission for PWC 056 Task #2.

The Idea

Sort your array of numbers. Select a number. You have now two sub-arrays:
  1. The sub-array "to the left" of the selected number, a…

PWC 055, Task #1: Flip Binary

This blog post contains the "missing comments" from my contribution to the Perl Weekly Challenge 055. If you haven't read the Task #1 Problem Description: Flip Binary you might want to do that first.

Now to document a bit more, my submission for PWC 056 Task #1.

First, please feel free to suggest a better styl…

About Jared Martin

user-pic I blog about Perl.