const groups = ["000", "010", "100", "110", "111"];
in this array, I want to create an algorithm that :
groups the common characters together,
something like this
Group 1: C' (first 4 elements)
Group 2: AB (last two elements)
input array elements type is flexible, I can change it to a matrix if it makes doing this easier. help plox