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
| /* | |
| n = 3 | |
| n! = n(n-1)! | |
| 3! = 6 permutari | |
| 1 2 3 | |
| 1 3 2 | |
| 2 1 3 |
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
| /* | |
| P1 , P2, P3 | |
| Panta P1P2 == Panta P2P3 sunt coliniare | |
| m = y2 - y1 / x2 - x1 | |
| Panta a doua puncte iti spune cat de inclinata este dreapta care trece prin ele, adica cat de mult creste sau scade valoarea lui y atunci cand x creste |
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
| /* | |
| Singly Linked List (Lista Simplu Inlantuita) (Grafuri-reprezentare prin liste de adiacenta) | |
| -------------------------------------------- | |
| Doubly Linked List | |
| Circular Linked List | |
| node1(info, next) ---> node2(info, next)---> node3(info, next)---> ....->nodeN(info, NULL) |
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
| //Problema: | |
| //Se citesc de la tastatura coordonatele a 3 puncte diferite in plan. Decideti daca aceste puncte sunt colineare. | |
| //punct1(x,y) | |
| //punct2(x,y) | |
| //punct3(x,y) | |
| // panta dreptei determinate de segmentul P1P2 = panta dreptei terminate de segmentul P2P3, |
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 <string> | |
| #include <cstring> | |
| using namespace std; | |
| // =============================================== | |
| // clasa de baza: carte de vizita | |
| //================================================ | |
| class CarteDeVizita { |
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> | |
| using namespace std; | |
| class Contor { | |
| private: | |
| static int numarObiecte; | |
| public: |
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 <fstream> | |
| #include <vector> | |
| #include <cmath> | |
| #include <algorithm> | |
| using namespace std; | |
| //CLASA PUNCT | |
| class Punct { |
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
| /* | |
| ioana ---> danaia | |
| EDIT DISTANCE | |
| ------------- | |
| cuvant1 --->cuvant2 | |
| source ---> destinatie |
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 <cmath> | |
| #include <vector> | |
| using namespace std; | |
| struct Point { | |
| double x, y; | |
| }; |
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<unistd.h> | |
| using namespace std; | |
| int main(int argc, char const *argv[]) | |
| { | |
| if( fork() ) { |