Advertisement
Guest User

Untitled

a guest
Nov 21st, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. #ifndef DEBUG
  5. #define DEBUG(...) printf(__VA_ARGS__)
  6. #endif
  7.  
  8.  
  9. typedef struct Node {
  10. int val;
  11. struct Node *next;
  12. struct Node *prev;
  13. } node;
  14.  
  15. void dodaj(node **head, node **tail, node **half, int val, *brelemenata){
  16. node *new;
  17.  
  18. new = (node *) malloc(sizeof(node));
  19.  
  20. if(!new) return;
  21.  
  22. new->val = val;
  23. new->next = *head;
  24. new->prev = ;
  25. *head = new;
  26.  
  27. (*brelemenata)++;
  28. }
  29.  
  30. void obrisi(node **tail, *brelemenata){
  31. node *tmp;
  32.  
  33. if(!*head) return;
  34.  
  35. tmp = (*head)->next;
  36. free(*head);
  37. *head = tmp;
  38.  
  39. (*brelemenata)--;
  40.  
  41. }
  42.  
  43. void polprvihnakraj(brelemenata){
  44.  
  45.  
  46.  
  47.  
  48. }
  49.  
  50. int main() {
  51. int n, x, k, brelemenata = 0;
  52. char c;
  53. node *head = NULL, *tail = NULL, *half = NULL;
  54.  
  55. scanf("%d", &n);
  56.  
  57. for(int i = 0; i < n; ++i) {
  58. scanf("%c%d", &c, &x);
  59.  
  60. if(c == 'd') {
  61.  
  62. } else if(c == 'o') {
  63.  
  64. } else if (c == 'p') {
  65.  
  66. }
  67. }
  68.  
  69. return 0;
  70. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement