I have a 2D array that I want to initialize with a b and c values, such that 50% of the cells are a, 25% b and 25% c. Can you please suggest me a way to do this ?
EDIT : I have found a solution for 1D array that I can adapt for a 2D array (I initialize deterministically then shuffle): Shuffle array in C
Is there a better way ?