https://codeanddebug.in/blog/the-painters-partition-problem-ii/