improve test and example for Grains

* Improved the test to include input validation
* Added a benchmark in the test file
* Improved example solution
  * Better documentation and explanation
  * Now passes new test file