Hi,
Basically I am trying to create a blocked linked list(unrolled linked
list) with following properties
- Configurable number of elements in each node
- No duplicate elements in the unrolled linked list
- Linked list is sorted either during insertion or after creating the
linked list
- In place
Assuming I need to create a sorted unrolled linked list with no
duplicate elements with block size say 2
Example: 10,2,4,2,5,7,9.11,11,5
Final blocked linked list: (2,4)->(5,7)->(9,10)->(11,x) or in reverse
order
Note: x means unutilized location in the array wihtin the node. In
case there are not enough elements to insert in a node, some memory
allocated for a node is unutilized
// Following is node structure
#define ARRAY_SZ 2
typedef struct node
{
struct node* next;
long long int elements[ARRAY_SZ];
long long int elemIndex;
}NODE, *NODE_PTR;
Can you suggest me a way to do this correctly and efficiently? It
could be an pseudo text or C-code.
Thanks
Varun
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.