You can only eat fish the same size or less than yourself.
For example, if your size is 2 and you encounter a fish of size 3, you must wait to be of at least size 3 to eat it (if you ever reach size 3). Your solution don't take size into consideration.
7 You can and only eat each fish once.
Your solution re-eats the same fish for each level.
Logical I don't understand how is the right solution 5, I think it' 4.
For example, if your size is
2
and you encounter a fish of size3
, you must wait to be of at least size3
to eat it (if you ever reach size3
). Your solution don't take size into consideration.Your solution re-eats the same fish for each level.