Recently I got this question in one of my interviews, which I unfortunately skipped, but I'm very curious to get the answer. Can you help me?

```
int sum = 0;
int num = 100000000;
for (int i = 0; i < num; i++){
    for (int j = 0; j < num; j++ ){
        sum += m_DataX[i] * m_DataX[j];
    }
}

```

EDITED: Also I would like to see if it is possible to optimize if we have the following expression for `sum`:

```
sum += m_DataX[i] * m_DataY[j];

```