Add statement for problem 6 and some test cases.
Add solution to problem 6 using linear complexity order.