I'm struggling to wrap my head around how I could calculate a seemingly simple algorithm and am wondering if anyone can provide some guidance.
I have a 2D array of type int that stores one digit values. It looks something like this:
[0][0][0][0]
[0][1][0][0]
[1][0][1][1]
[1][2][0][1]
[0][0][1][0]
[1][2][0][0]
My function takes in two int values which correspond to a column in this 2D array. When given the values 0 and 1, I need to check how many times the combination of
[0][0],[0][1],[0][2],[1][0],[1][1],[1][2] appears when looking at the 0th and 1st column, and use that to calculate entropy (which is besides the issue right now).
Anyone have any ideas on how I could achieve this?