Revamped 3rd and 4th solution so it stepped through by sequence length. Also added test.