Hey, can you read the code and make/append necessary changes? Use my style of coding and layout throughout#include <stdio.h>
#include <string.h>
#include <stdlib.h>
// 1 is the highest priority and 5 is the lowest
#define MAX_RESOURCES 10
#define MAX_ZONES 100

typedef struct
{
    char *array[MAX_RESOURCES];
    int top;
} resources;

typedef struct Zone
{
    resources resources;
    int people;
    struct Zone *next;
    char *zoneID;
    int zonePriority; // From 1 to 5
} zone;

typedef struct PQNode
{
    zone *zone;
    int priority;
    struct PQNode *next;
} PQNode;

typedef struct PriorityZones
{
    PQNode *head;
    PQNode *tail;
} PriorityZones;

void pushResource(resources *r, char *resource)
{
    if (r->top < MAX_RESOURCES - 1)
    {
        r->top++;
        r->array[r->top] = resource;
    }
    else
    {
        printf("Resource stack overflow!\n");
    }
}

void popResource(resources *r)
{
    if (r->top >= 0)
    {
        r->top--;
    }
    else
    {
        printf("Resource stack underflow!\n");
    }
}

zone *createZone()
{
    zone *newZone = (zone *)malloc(sizeof(zone));
    newZone->resources.top = -1; 
    // Something incomplete here
    return newZone;
}

int setZonePriority(zone *){
    // The priority depends on both the number of resources and the number of people:
    // write some mathematical relationship
}

void insertZone(PriorityZones *zoneSet, zone *newZone)
{
    PQNode *newNode = (PQNode *)malloc(sizeof(PQNode));
    newNode->zone = newZone;
    newNode->priority = setZonePriority // Incomplete! 

    if (zoneSet->head == NULL)
    {
        zoneSet->head = zoneSet->tail = newNode;
    }
    else
    {
        PQNode *current = zoneSet->head;
        while (current != NULL && current->priority <= priority)
        {
            current = current->next;
        }

        if (current == NULL)
        {
            zoneSet->tail->next = newNode;
            zoneSet->tail = newNode;
        }
        else if (current == zoneSet->head)
        {
            newNode->next = zoneSet->head;
            zoneSet->head = newNode;
        }
        else
        {
            newNode->next = current->next;
            current->next = newNode;
        }
    }
}

zone *searchZone(PriorityZones *zoneSet, char *zoneID)
{
    PQNode *current = zoneSet->head;
    while (current != NULL)
    {
        if (strcmp(current->zone->zoneID, zoneID) == 0)
        {
            return current->zone;
        }
        current = current->next;
    }
    return NULL;
}

void deleteZone(PriorityZones *zoneSet, zone *focus)
{
    PQNode *current = zoneSet->head, *prev = NULL;
    while (current != NULL)
    {
        if (current->zone == focus)
        {
            if (prev == NULL)
            {
                zoneSet->head = current->next;
            }
            else
            {
                prev->next = current->next;
            }
            if (current == zoneSet->tail)
            {
                zoneSet->tail = prev;
            }
            free(current);
            break;
        }
        prev = current;
        current = current->next;
    }
}
// Write function for init zone: Set the priority for each zone

// Team allotment:
struct Team{
    char*id; 
    char* members; 
}

// Implement of queue of Teams:
struct TeamQ{
    char*team[max teams]// Array implementation of queues
}
// Necessary functions go here!
void setTeam(){
    // Set all the teams: 
}

/*
1.User enters number of team members
2. A algorithm decides how much teams are formed
3. Teams are technically pointers, that transport people from one zone to a safe place [say a Binary tree]
4. There will be a binary tree that has the addresses of zones.
therefore, rescue process will involve
        - for one element in the priority queue, the team visits the last [tail zone] of the element 
        - each team can take only a min no. of people: Decided Mathematically.
        - Each team while visiting a zone will consume some resources, but this is limited to the priority
        - Rescue happens till the people in every zone == 0
5. Create a binary tree to record the addresses and the number of people rescued. Also, decrement the no. of people from the zone
each time people are rescued and increment the no. of people into the respective tree 
*/

// Binary tree implementation:
typedef struct BTnode{
    zone * address; 
    zone * right; 
    zone * left; 
    int ppl; // == zone->people
}

// Binary tree implementation:
typedef struct Tree{
    // necessary functions 
}