title: mutidimension array with muti dimension data types in c
body: <p>I have to implement a strange data structure. There is a queue, which contains memory allocations(it may be a queue or array but no-Linked list or anything that use malloc() in the code).
  and we have to use this body:-</p>
  
  <pre><code>Struct  //we don't have to use pointer in structure in achieving the task
  {
  int frequency;
  unsigned char symbol;
  short int left,right;     
  }
  </code></pre>
  
  <p>Here you can see that we have alphabets like a,b,c,d and e at the first index and their corresponding frequency on second index and the other two index are not useful for the moment but we have to allocate memory for them right now.</p>
  
  <p>For now only thing which is useful for us is just the second index (which is the frequency of alphabets). What i have to do in this question is two add the two minimum frequency (i have to to put that it at a place so that increasing order must be maintained) for example: You can see below we add first two nodes frequency: So for the first index we obtained result of "a+b",Lets say "z"(a+b=z) and for second index(3+3=6) and the other two index are "0" and"0" , so not useful for us. and we have to now adjust this obtained memory such that it maintains increasing order of frequency</p>
  
  <p>Now question is :
  (1) Any ideas how to implement this type of data structure ? (without using pointer,malloc() , linked lists etc.) (but can use queue/stack), Moreover we can use memcpy() for shifts.
  (2) How to achieve sorting in this type of case (but it's secondary thing , first how to implement it ?)  (I am sorry i am tagging this question at the topics which could make the solution of this question, sorry for this)
  And please do not hesitate me to ask if you don't understand anything in this question.</p>