### Luís Ramalho

In order to solve the problem I started by marking the position of each nucleotide in a 2D array. There are 4 nucleotides (A, C, G and T), so a[0][i] will mark the position i of nucleotide A as 1 if it appears in the string, otherwise a[0][i] will have the value of 0. The same for a[1][i] for nucleotide C, and so on.
Once we have the position of each nucleotide in the 2D array a, we can proceed to compute the prefix sum of each of the nucleotides: