Please solve the programming task below using a self-contained code snippet in a markdown code block.

You are given a 0-indexed string s and a dictionary of words dictionary. You have to break s into one or more non-overlapping substrings such that each substring is present in dictionary. There may be some extra characters in s which are not present in any of the substrings.
Return the minimum number of extra characters left over if you break up s optimally.
 
Please complete the following python code precisely:
```python
class Solution:
    def minExtraChar(self, s: str, dictionary: List[str]) -> int:
```