Coding Problems

Bijective Base Representation

Bijective Base Representation

I wanted to convert a large number of string representations of common Base 10 number to Bijective Base 10. I found a textual method of creating the Bijective Base 10 string representations from Base 10 string representations.

Fitting a list of words to a a regular expression

Fitting a list of words to a a regular expression

John D. Cook Consulting seems to do the manner of work that regular programmers like me only dream of doing, and their blog entries are uniformly interesting, educational and somehow esoteric. I’m amazed by them.

John D. Cook Consulting’s blog published a post Fitting a regular expression to a list of words where (apparently!) John Cook himself shows how to use a Python library to combine several strings into a regular expression that, when interpreted by a program like grep, will match all those strings.

Depth-first Unary Degree Sequence

Depth-first Unary Degree Sequence

The old Daily Coding Problem email list gave us this problem around 2020:

Daily Coding Problem: Problem #237 [Easy]

A tree is symmetric if its data and shape remain unchanged when it is reflected about the root node. The following tree is an example:

        4
      / | \
    3   5   3
  /           \
 9             9

Given a k-ary tree, determine whether it is symmetric.

This problem is less well described than I thought when I worked on it in 2020.