Guest User

Untitled

a guest
Nov 17th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. typedef struct _list
  4. {
  5. int size; //number of unique characters
  6. char* charList;
  7. int* freqList;
  8. } List;
  9.  
  10. typedef struct _TreeNode {
  11. int freq;
  12. unsigned char asciiChar;
  13. struct _TreeNode *left;
  14. struct _TreeNode *right;
  15. } TreeNode;
  16.  
  17. typedef struct _Node {
  18. TreeNode* ptr;
  19. struct _Node *next;
  20. } Node;
  21.  
  22.  
  23.  
  24. List* find_frequency(char* filename);
  25. void write_output_1(char* filename, List* countList);
  26. Node* _pq_enqueue(Node **pq, TreeNode* new_object, int (*cmp_fn)(const void *, const void *));
  27. void _print_node(Node *list, FILE* fp);
  28. //int _print_fn(TreeNode* tree);
  29. int _compare_fn(const void * num, const void *test);
Add Comment
Please, Sign In to add comment