Convert to string and search for zero | to_string(a).find('0') | beats 100% time (0ms)
Intuition & ApproachIterateain[1, n / 2]andb=n - aComplexity
Time complexity:O(n)
Space complexity:
Code
# Intuition & Approach

Iterate `a` in `[1, n / 2]` and `b` = `n - a`

# Complexity

- Time complexity: $$O(n)$$
- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```cpp []
vector<int> getNoZeroIntegers(int n) {
    int a = 1;
    while (a <= n / 2) {
        if (to_string(a).find('0') == string::npos &&
            to_string(n - a).find('0') == string::npos)
            return {a, n - a};
        a++;
    }
    return {0, 0};
}
```
['C++']