Share 'Can any data structure be represented by one-dimensional arrays?'
I believe so. For example,
Each node of a binary tree would use 4 array cells: one for a pointer to the father node, two pointers to the two sons, and one for the value.
Each element of a hash table would use 4 or 5 array cells: the index, possibly a random key that efficiently encode the index, the value, a pointer to the previous index, and a pointer to the next index. This would make finding,…
You can share this discussion in two ways…
Share this link:
Send it with your computer's email program: Email this