I have a matrix:

```
{
  {2, 3},
  {4, 1, 6},
  {7, 8}
}

```

And I need to pick one element from each array and return the sum. For example:

* `2 + 4 + 7 = 13`
* `2 + 1 + 7 = 10`
* `2 + 6 + 7 = 15`
* `2 + 4 + 8 = 14`
* `2 + 1 + 8 = 11`
* `2 + 6 + 8 = 16`
* `3 + 4 + 7 = 14`
* `3 + 1 + 7 = 11`
* `3 + 6 + 7 = 16`
* `3 + 4 + 8 = 15`
* `3 + 1 + 8 = 12`
* `3 + 6 + 8 = 17`

I'm novice in algorithms and I don't know how to start to solve problem. What type of algorithms I need to use?