Skip to content

Instantly share code, notes, and snippets.

View thinkphp's full-sized avatar
💭
If I have seen further it is only by standing on the shoulders of giants. NEWTON

Adrian Statescu thinkphp

💭
If I have seen further it is only by standing on the shoulders of giants. NEWTON
View GitHub Profile
@thinkphp
thinkphp / gist:44192ebf4bd4c99f63e140dc2e19dc2c
Created May 17, 2026 12:27
metoda 3 cu distanta euclidiana Puncte coliniare
A x Point(1)
B x Point(2)
C x Point(3)
@thinkphp
thinkphp / ClosestPairPoints.java
Created May 17, 2026 12:18
ClosestPairPoints.java
import java.util.*;
/*
Distanta minima dintre mai multe puncte
|
| x x
| x
| x x
| x
@thinkphp
thinkphp / merge-sorted-linkedlists.java
Last active May 17, 2026 11:42
merge-sorted-linkedlists.java
/*
1 -> 2 -> 4
1 -> 3 -> 4
*/
class ListNode {
int val;
ListNone next;
#include <iostream>
#include <string>
#include <cstring>
using namespace std;
// ============================================================
// Proiect Carte de Vizita ----> Clasa de baza
// ============================================================
class CarteDeVizita {
protected:
@thinkphp
thinkphp / SinglyLinkedList.java
Last active May 10, 2026 14:23
SinglyLinkedList Data Structure
/*
Array =
int a
Data Structures
---------------
Singly Linked List (Liste Simplu Inlantuite)
Double Linked List (Dublu)
@thinkphp
thinkphp / nextPermutation.java
Created May 10, 2026 12:33
Next Permutation LeetCode
/*
n = 3
n! = n(n-1)!
3! = 6 permutari
1 2 3
1 3 2
2 1 3
@thinkphp
thinkphp / coliniare.java
Last active May 10, 2026 11:46
Puncte coliniare. problema
/*
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
@thinkphp
thinkphp / singly-linked-list.cpp
Created May 9, 2026 09:15
lista simplu inlantuita Data Structure
/*
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)
@thinkphp
thinkphp / colineare.cpp
Created May 9, 2026 07:02
Determinare puncte colinearea
//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,
@thinkphp
thinkphp / cartedevizitaclass.cpp
Last active May 3, 2026 10:12
Carte de vizita Proiect
#include <iostream>
#include <string>
#include <cstring>
using namespace std;
// ===============================================
// clasa de baza: carte de vizita
//================================================
class CarteDeVizita {