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 / LLM.md
Created April 27, 2026 11:34
LLM Path Study

Iată lista ajustată, optimizată specific pentru LLM-uri:


🧠 LLM Path — Lista Ajustată (12 resurse)

🧮 Fundație Matematică (minimă, suficientă)

1. Introduction to Linear Algebra — Gilbert Strang Vectori, matrici, transformări. Fără asta nu înțelegi nici embeddings, nici attention.

@thinkphp
thinkphp / MajorityElement.java
Created April 26, 2026 14:11
Boyer Moore Algorithm
Algoritmul Boyer Moore Vote MAjority Element
int count = 0
int candidate = 0
for(int num: nums) {
if(count == 0) {
@thinkphp
thinkphp / Hanoi.java
Created April 26, 2026 13:05
Tower of Hanoi Divide Et Impera
import java.util.Scanner;
//Turnurile din Hanoi (DIVIDE ET IMPERA)
/*
Problema:
Se dau 3 tije simbolizate a, b, c.
@thinkphp
thinkphp / FastAlarm.java
Created April 26, 2026 12:28
Fast Alarm Codeforce java
import java.util.Scanner;
public class FalseAlarm {
static Scanner scanner = new Scanner(System.in);
static void solve() {
int n = scanner.nextInt(); //citim size array
@thinkphp
thinkphp / fast_pow.java
Created April 26, 2026 11:44
Ridicare la putere in timp logaritmic. O(log N)
/*
2^10
pow(2,10)
2 * 2 * 2 * ....* 2
de 10 ori
fast_pow(2,10)
log n = log 10 = logaritm in baza 2 din 10 = 3
@thinkphp
thinkphp / codeforces-false-alarm.cpp
Created April 25, 2026 09:11
False Alarm CodeForces.com codeforces-false-alarm.cpp
void solve() {
int n, x;//dimnesiune si butonul apasat: x secunde
cin>>n>>x;
int l = 1e5, r = -1;
for(int i = 0; i < n; ++i) {
@thinkphp
thinkphp / cycle-detection-Floyd.cpp
Created April 25, 2026 08:47
Find Duplicate Cycle Detection Floyd cycle-detection-Floyd.cpp
//1,3,4,2,2
[1,2,3,4]
4/2 = 2
int findDuplicate(vector<int>_&nums) {
int low = 1;
int high = nums.size() - 1;// 5= 5-1= 4
[1,2,3,4]
@thinkphp
thinkphp / find-duplicate-nlogn-binary-search.cpp
Created April 25, 2026 08:29
find-duplicate-nlogn-binary-search.cpp
int findDuplicate(vector<int>_&nums) {
int low = 1;
int high = nums.size() - 1;// 5= 5-1= 4
[1,2,3,4]
@thinkphp
thinkphp / valid-mountain.cpp
Last active April 25, 2026 07:34
valid mountain leetcode
bool validMountain(vector<int>& arr) {
int n = arr.size();
int start = 0;
int end = n - 1;
//urcare
@thinkphp
thinkphp / boyorgirl.java
Created April 19, 2026 17:49
Codeforces Boy or Girl cu SET
public class Main {
//Maarriaa
public static int CountDistinctChars(String s) {
Set<Character> set = new HashSet<>();//caracterele vor fi distincte
for(char c : s.toCharArray()) {//m, a,