What is the best data structure I can use for my matrix that will contain short variables but most of elements are empty..
I could simply use n by b array for the matrix but the problem is that I don't want to waste the memory because only a few elements are in the matrix..
I was going to use a linked list or a hash table but not sure which one would be the best data structure and how to implemente this..