I took another look at this and realized my code is wrong. For the extra test cases:
{[:b, :d, :g], [:a, :b, :c, :d, :g]},
{[:b, :d], [:b, :d]},
it fails
I took another look at this and realized my code is wrong. For the extra test cases:
{[:b, :d, :g], [:a, :b, :c, :d, :g]},
{[:b, :d], [:b, :d]},
it fails