This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| 1 | |
| / \ | |
| 2 4 | |
| / / | |
| 3 5 | |
| 1 | |
| / \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| typedef struct node_type { | |
| int id; | |
| struct node_type *left, | |
| *right; | |
| } NodeT; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| typedef struct node_type { | |
| int id; | |
| struct node_type *left, | |
| *right; | |
| } NodeT; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| typedef struct node_type { | |
| int id; | |
| struct node_type *left, | |
| *right; | |
| } NodeT; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| typedef struct node_type { | |
| int id; | |
| struct node_type *left, | |
| *right; | |
| } NodeT; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| /* | |
| Deque Data Structure | |
| push_front muta front cu o pozitie inapoi acolo | |
| push_back scrie la pozitia (front + size) % cap , apoi creste size | |
| pop_front citste v[front] , avanteaza front = (front + 1) % cap, scade size | |
| pop_back citeste ultimul element de la (front + size - 1) % cap, si scade size,nu muta front |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <vector> | |
| #include <string> | |
| #include <cmath> | |
| #include <sstream> | |
| #include <stdexcept> | |
| using namespace std; | |
| /* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| typedef struct node_type { | |
| int id; | |
| struct node_type *left, | |
| *right; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <string.h> | |
| #define SIZE 16 | |
| typedef struct { | |
| char key[32]; | |
| int value; | |
| int used; /*1 - ocupat, 2 - liber*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //clasa de baza | |
| class Animal { | |
| String nume; | |
| Animal(String nume) { | |
| this.nume = nume; | |
| } | |
| void mananca() { |