[March Week 1] Code Gulf - 3/1

Write a program that will move the heading of a table to the left side so that given the table:

a b c d
[] A O X

it returns

a []
b A
c O
d X

Bonus points for proper design and use of data structures. By data structures, I don’t mean the stuff you find in books but merely classes, etc that make the code easy to read and understand.

For those doing this challenge in TypeScript there is a starter project on GitHub with some 2 tests that should be satisfied in the process.

here is a test template for my go people The Go Playground

my solution, The Go Playground

[edit] updated link with a working solution.

Looks like this solution is broken. I tried to run it and got an error about line 29 and 83. The error is below.

panic: runtime error: index out of range [0] with length 0

fixed the link, absd