gur111 icon

q1.h File for tester

gur111 | PRO | 04/13/20 04:38:38 PM UTC | 0 ⭐ | 665 👁️ | Never ⏰ | []
C |

450 B

|

None

|

0 👍

/

0 👎

#ifndef Q1_H_
#define Q1_H_
 
#include <stdbool.h>
#include <stdlib.h>
 
typedef struct node_t {
    int x;
    struct node_t *next;
} * Node;
 
typedef enum {
    SUCCESS = 0,
    MEMORY_ERROR,
    EMPTY_LIST,
    UNSORTED_LIST,
    NULL_ARGUMENT,
} ErrorCode;
 
int getListLength(Node list);
bool isListSorted(Node list);
void freeList(Node list);
 
ErrorCode mergeSortedLists(const Node list1, const Node list2, Node *merged_out);
#endif

Comments