ClaudeRhay 0 Newbie Poster

Say I have this definition:

#define SIZE 2000

typedef enum { TRUE, FALSE }Boolean;

typedef struct{
    char jobTitle[30];
    char jobDesc[255];
    char jobLoc[255];
    float salaryMin;
    float salaryMax;
    Boolean isAvailable;

typedef struct cursorNode{
    jobInfo jobRec;
    int next;

typedef struct hnode{
    HeapSpace heap;
    int Avail;

typedef int List;

typedef struct{
    List availJob;
    List notAvailJob

Let's say my function data type would be this:

dualList ConvertOld2NewList(VHeap *VH, List *L)

    return L; /*not sure about this since I will be converting this single list to a dual list*/

I was asked to write the code of function ConvertOld2NewList. Given a single list of job information, the function
will convert the given list which separates the available jobs from the non-available jobs and return
the newly created dual list to the calling function. In addition, each of the list in the dual list
is SORTED in ascending order according to the job title.

I was trying to figure out HOW EXACTLY would I be able to convert a given list into a dual list?

I'm considering statements like this:

if (VH->heap[?].jobRec.isAvailable == TRUE){

    /*place it in dualList.availJob ..... but HOW EXACTLY?*/

} else {


How would I traverse? Say I have an int/List pointer that is used for traversing, what statement would traverse it?

I have less knowledge about cursor-based implementation on linked list / array.
I was hoping that people here would be able to help me on this problem.
I'm practicing as well on my own too.

I hope you'll be able to help me.