Advertisement
gur111

q1.h File for tester

Apr 13th, 2020
369
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.45 KB | None | 0 0
  1. #ifndef Q1_H_
  2. #define Q1_H_
  3.  
  4. #include <stdbool.h>
  5. #include <stdlib.h>
  6.  
  7. typedef struct node_t {
  8.     int x;
  9.     struct node_t *next;
  10. } * Node;
  11.  
  12. typedef enum {
  13.     SUCCESS = 0,
  14.     MEMORY_ERROR,
  15.     EMPTY_LIST,
  16.     UNSORTED_LIST,
  17.     NULL_ARGUMENT,
  18. } ErrorCode;
  19.  
  20. int getListLength(Node list);
  21. bool isListSorted(Node list);
  22. void freeList(Node list);
  23.  
  24. ErrorCode mergeSortedLists(const Node list1, const Node list2, Node *merged_out);
  25. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement