Arian Soleimanzadeh
  • Home
  • Blog
  • Podcasts
  • Videos
  • Library
  • Contact
العربيةArabic
DeutschGerman
EnglishEnglish
فارسیPersian
한국어Korean
中文Chinese
Panel•Quick Contact

Languages

Choose your interface locale

ar

العربية

Arabic

de

Deutsch

German

en

English

English

fa

فارسی

Persian

ko

한국어

Korean

zh

中文

Chinese

Get Appointment

Drop a quick message — I’ll reply as soon as possible.

LinkedInFast response
ALGORITHMS & DATA STRUCTURES LIBRARY

Algorithms as readable ideas, with code nearby.

Browse the trekhleb-inspired topic catalog. Each page is now a complete bilingual lesson: simple explanation, execution steps, complexity, readable JavaScript, interview notes, common mistakes and further reading.

112reading topics
19data structures
93algorithms
15categories
001⌁

Linked List

A linked list stores values in nodes. Each node keeps the value plus a reference to the next node, so the elements do not need to live next to each other in memory.

BeginnerRead →
002⌁

Doubly Linked List

Doubly Linked List is a data structure in the data structures family. This data structure organizes values and relationships so its most important operations have predictable costs.

BeginnerRead →
003⌁

Queue

A queue is FIFO: the first item that enters is the first item that leaves.

BeginnerRead →
004⌁

Stack

A stack is a LIFO structure: the last value pushed is the first value popped.

BeginnerRead →
005⌁

Deque

Deque is a data structure in the data structures family. This data structure organizes values and relationships so its most important operations have predictable costs.

BeginnerRead →
006⌁

Hash Table

A hash table maps keys to bucket locations using a hash function. It aims for very fast average lookup, insertion and deletion.

BeginnerRead →
007⌁

Heap

A heap is a complete tree, usually stored in an array, where every parent obeys a priority relation with its children. In a min-heap the smallest value stays at the root; in a max-heap the largest does.

BeginnerRead →
008⌁

Priority Queue

A priority queue removes the item with the highest (or lowest) priority first, not necessarily the item that arrived first.

BeginnerRead →
009⌁

Trie

Trie is a data structure in the data structures family. This data structure organizes values and relationships so its most important operations have predictable costs.

AdvancedRead →
010⌁

Tree

Tree is a data structure in the data structures family. This data structure organizes values and relationships so its most important operations have predictable costs.

AdvancedRead →
011⌁

Binary Search Tree

A binary search tree keeps smaller keys in the left subtree and larger keys in the right subtree, so search follows one branch at a time when the tree is balanced.

AdvancedRead →
012⌁

AVL Tree

An AVL tree is a self-balancing BST that keeps the height difference of each node's left and right subtrees within one, restoring balance with rotations.

AdvancedRead →
013⌁

Red-Black Tree

Red-Black Tree is a data structure in the data structures family. This data structure organizes values and relationships so its most important operations have predictable costs.

AdvancedRead →
014⌁

Segment Tree

Segment Tree is a data structure in the data structures family. This data structure organizes values and relationships so its most important operations have predictable costs.

AdvancedRead →
015⌁

Fenwick Tree

Fenwick Tree is a data structure in the data structures family. This data structure organizes values and relationships so its most important operations have predictable costs.

AdvancedRead →
016⌁

Graph

Graph is a data structure in the data structures family. This data structure organizes values and relationships so its most important operations have predictable costs.

AdvancedRead →
017⌁

Disjoint Set

Disjoint Set / Union-Find tracks a collection of non-overlapping groups and supports two key operations: find which group an item belongs to, and union two groups.

AdvancedRead →
018⌁

Bloom Filter

A Bloom filter is a space-efficient probabilistic set-membership structure. It can say 'definitely not present' or 'possibly present', so false positives are possible but false negatives are not in the standard design.

AdvancedRead →
019⌁

LRU Cache

An LRU cache evicts the least recently used item when capacity is full. The classic O(1) design combines a hash map with a doubly linked list.

AdvancedRead →
020⌁

Bit Manipulation

Bit Manipulation is a algorithm in the math family. This mathematical algorithm turns a numeric identity or recurrence into a finite, computable procedure.

BeginnerRead →
021⌁

Binary Floating Point

Binary Floating Point is a algorithm in the math family. This mathematical algorithm turns a numeric identity or recurrence into a finite, computable procedure.

BeginnerRead →
022⌁

Factorial

n! is the product 1 × 2 × … × n, with 0! defined as 1.

BeginnerRead →
023⌁

Fibonacci Number

The Fibonacci sequence starts from base values and each next number is the sum of the previous two.

BeginnerRead →
024⌁

Prime Factors

Prime Factors is a algorithm in the math family. This mathematical algorithm turns a numeric identity or recurrence into a finite, computable procedure.

BeginnerRead →
025⌁

Primality Test

Primality Test is a algorithm in the math family. This mathematical algorithm turns a numeric identity or recurrence into a finite, computable procedure.

BeginnerRead →
026⌁

Euclidean Algorithm

Euclid's algorithm finds gcd(a, b) by repeatedly replacing (a, b) with (b, a mod b) until the remainder becomes zero.

BeginnerRead →
027⌁

Least Common Multiple

Least Common Multiple is a algorithm in the math family. This mathematical algorithm turns a numeric identity or recurrence into a finite, computable procedure.

BeginnerRead →
028⌁

Sieve of Eratosthenes

The Sieve of Eratosthenes finds all primes up to n by marking multiples of each discovered prime as composite.

BeginnerRead →
029⌁

Is Power of Two

Is Power of Two is a algorithm in the math family. This mathematical algorithm turns a numeric identity or recurrence into a finite, computable procedure.

BeginnerRead →
030⌁

Pascal's Triangle

Pascal's Triangle is a algorithm in the math family. This mathematical algorithm turns a numeric identity or recurrence into a finite, computable procedure.

BeginnerRead →
031⌁

Complex Number

Complex Number is a algorithm in the math family. This mathematical algorithm turns a numeric identity or recurrence into a finite, computable procedure.

BeginnerRead →
032⌁

Radian & Degree

Radian & Degree is a algorithm in the math family. This mathematical algorithm turns a numeric identity or recurrence into a finite, computable procedure.

BeginnerRead →
033⌁

Fast Powering

Fast Powering is a algorithm in the math family. This mathematical algorithm turns a numeric identity or recurrence into a finite, computable procedure.

BeginnerRead →
034⌁

Horner's Method

Horner's Method is a algorithm in the math family. This mathematical algorithm turns a numeric identity or recurrence into a finite, computable procedure.

BeginnerRead →
035⌁

Matrices

Matrices is a algorithm in the math family. This mathematical algorithm turns a numeric identity or recurrence into a finite, computable procedure.

BeginnerRead →
036⌁

Euclidean Distance

Euclidean Distance is a algorithm in the math family. This mathematical algorithm turns a numeric identity or recurrence into a finite, computable procedure.

BeginnerRead →
037⌁

Integer Partition

Integer Partition is a algorithm in the math family. This mathematical algorithm turns a numeric identity or recurrence into a finite, computable procedure.

AdvancedRead →
038⌁

Square Root — Newton's Method

Square Root — Newton's Method is a algorithm in the math family. This mathematical algorithm turns a numeric identity or recurrence into a finite, computable procedure.

AdvancedRead →
039⌁

Liu Hui π Algorithm

Liu Hui π Algorithm is a algorithm in the math family. This mathematical algorithm turns a numeric identity or recurrence into a finite, computable procedure.

AdvancedRead →
040⌁

Discrete Fourier Transform

Discrete Fourier Transform is a algorithm in the math family. This mathematical algorithm turns a numeric identity or recurrence into a finite, computable procedure.

AdvancedRead →
041⌁

Cartesian Product

Cartesian Product is a algorithm in the sets & dynamic programming family. This problem is naturally expressed as smaller overlapping states/subproblems or as controlled generation of combinations.

BeginnerRead →
042⌁

Fisher–Yates Shuffle

Fisher–Yates Shuffle is a algorithm in the sets & dynamic programming family. This problem is naturally expressed as smaller overlapping states/subproblems or as controlled generation of combinations.

BeginnerRead →
043⌁

Power Set

Power Set is a algorithm in the sets & dynamic programming family. This problem is naturally expressed as smaller overlapping states/subproblems or as controlled generation of combinations.

AdvancedRead →
044⌁

Permutations

Permutations is a algorithm in the sets & dynamic programming family. This problem is naturally expressed as smaller overlapping states/subproblems or as controlled generation of combinations.

AdvancedRead →
045⌁

Combinations

Combinations is a algorithm in the sets & dynamic programming family. This problem is naturally expressed as smaller overlapping states/subproblems or as controlled generation of combinations.

AdvancedRead →
046⌁

Longest Common Subsequence

LCS finds the longest sequence of values that appears in both inputs in the same relative order, but not necessarily contiguously.

AdvancedRead →
047⌁

Longest Increasing Subsequence

Longest Increasing Subsequence is a algorithm in the sets & dynamic programming family. This problem is naturally expressed as smaller overlapping states/subproblems or as controlled generation of combinations.

AdvancedRead →
048⌁

Shortest Common Supersequence

Shortest Common Supersequence is a algorithm in the sets & dynamic programming family. This problem is naturally expressed as smaller overlapping states/subproblems or as controlled generation of combinations.

AdvancedRead →
049⌁

Knapsack Problem

In 0/1 knapsack, each item has a weight and value and may be chosen at most once. The goal is maximum total value without exceeding capacity.

AdvancedRead →
050⌁

Maximum Subarray

The maximum subarray problem asks for the contiguous segment with the largest sum. Kadane's algorithm solves it in O(n).

AdvancedRead →
051⌁

Combination Sum

Combination Sum is a algorithm in the sets & dynamic programming family. This problem is naturally expressed as smaller overlapping states/subproblems or as controlled generation of combinations.

AdvancedRead →
052⌁

Hamming Distance

Hamming Distance is a algorithm in the strings family. This string algorithm reasons about characters, prefixes, suffixes or edit/match state while avoiding unnecessary repeated comparisons.

BeginnerRead →
053⌁

Palindrome

A palindrome reads the same forward and backward after applying the problem's normalization rules.

BeginnerRead →
054⌁

Levenshtein Distance

Levenshtein distance is the minimum number of single-character insertions, deletions and substitutions needed to transform one string into another.

AdvancedRead →
055⌁

Knuth–Morris–Pratt

Knuth–Morris–Pratt is a algorithm in the strings family. This string algorithm reasons about characters, prefixes, suffixes or edit/match state while avoiding unnecessary repeated comparisons.

AdvancedRead →
056⌁

Z Algorithm

Z Algorithm is a algorithm in the strings family. This string algorithm reasons about characters, prefixes, suffixes or edit/match state while avoiding unnecessary repeated comparisons.

AdvancedRead →
057⌁

Rabin–Karp

Rabin–Karp is a algorithm in the strings family. This string algorithm reasons about characters, prefixes, suffixes or edit/match state while avoiding unnecessary repeated comparisons.

AdvancedRead →
058⌁

Longest Common Substring

Longest Common Substring is a algorithm in the strings family. This string algorithm reasons about characters, prefixes, suffixes or edit/match state while avoiding unnecessary repeated comparisons.

AdvancedRead →
059⌁

Regular Expression Matching

Regular Expression Matching is a algorithm in the strings family. This string algorithm reasons about characters, prefixes, suffixes or edit/match state while avoiding unnecessary repeated comparisons.

AdvancedRead →
060⌁

Linear Search

Linear search checks elements one by one until it finds the target or reaches the end.

BeginnerRead →
061⌁

Jump Search

Jump Search is a algorithm in the search family. This search algorithm narrows or scans a search space until the target is found or proven absent.

BeginnerRead →
062⌁

Binary Search

Binary search finds a target in a sorted search space by repeatedly discarding half of the remaining range.

BeginnerRead →
063⌁

Interpolation Search

Interpolation Search is a algorithm in the search family. This search algorithm narrows or scans a search space until the target is found or proven absent.

BeginnerRead →
064⌁

Bubble Sort

Bubble sort repeatedly compares adjacent values and swaps out-of-order pairs, causing large values to 'bubble' toward the end.

BeginnerRead →
065⌁

Selection Sort

Selection Sort is a algorithm in the sorting family. This sorting algorithm rearranges values into an ordered sequence using a specific comparison/distribution strategy.

BeginnerRead →
066⌁

Insertion Sort

Insertion sort grows a sorted prefix. It takes the next value and shifts larger values right until the new value can be inserted in the correct place.

BeginnerRead →
067⌁

Heap Sort

Heap Sort is a algorithm in the sorting family. This sorting algorithm rearranges values into an ordered sequence using a specific comparison/distribution strategy.

BeginnerRead →
068⌁

Merge Sort

Merge sort uses divide and conquer: split the array until pieces are trivial, then merge sorted pieces back together.

BeginnerRead →
069⌁

Quicksort

Quicksort picks a pivot, partitions values around it, then recursively sorts the partitions.

BeginnerRead →
070⌁

Shellsort

Shellsort is a algorithm in the sorting family. This sorting algorithm rearranges values into an ordered sequence using a specific comparison/distribution strategy.

BeginnerRead →
071⌁

Counting Sort

Counting sort avoids comparisons. It counts how many times each key appears, then reconstructs the output in key order.

BeginnerRead →
072⌁

Radix Sort

Radix Sort is a algorithm in the sorting family. This sorting algorithm rearranges values into an ordered sequence using a specific comparison/distribution strategy.

BeginnerRead →
073⌁

Bucket Sort

Bucket Sort is a algorithm in the sorting family. This sorting algorithm rearranges values into an ordered sequence using a specific comparison/distribution strategy.

BeginnerRead →
074⌁

Straight Traversal

Straight Traversal is a algorithm in the linked lists family. This linked-list algorithm walks references rather than indexed positions, so pointer/reference order is the main source of correctness.

BeginnerRead →
075⌁

Reverse Traversal

Reverse Traversal is a algorithm in the linked lists family. This linked-list algorithm walks references rather than indexed positions, so pointer/reference order is the main source of correctness.

BeginnerRead →
076⌁

Tree Depth-First Search

Tree Depth-First Search is a algorithm in the trees family. This tree traversal visits nodes in a deliberate order while exploiting the tree's parent/child hierarchy.

BeginnerRead →
077⌁

Tree Breadth-First Search

Tree Breadth-First Search is a algorithm in the trees family. This tree traversal visits nodes in a deliberate order while exploiting the tree's parent/child hierarchy.

BeginnerRead →
078⌁

Graph Depth-First Search

DFS explores one path as deeply as possible before backtracking. It can be implemented recursively or with an explicit stack.

BeginnerRead →
079⌁

Graph Breadth-First Search

BFS explores a graph level by level using a queue. In an unweighted graph it finds shortest paths by number of edges.

BeginnerRead →
080⌁

Kruskal's Algorithm

Kruskal builds a minimum spanning tree by sorting edges by weight and taking the next cheapest edge that does not create a cycle.

BeginnerRead →
081⌁

Dijkstra's Algorithm

Dijkstra finds single-source shortest paths in a graph with non-negative edge weights by repeatedly finalizing the unsettled node with the smallest known distance.

AdvancedRead →
082⌁

Bellman–Ford Algorithm

Bellman–Ford computes single-source shortest paths even with negative edge weights, and can detect a reachable negative-weight cycle.

AdvancedRead →
083⌁

Floyd–Warshall Algorithm

Floyd–Warshall computes shortest paths between every pair of vertices with dynamic programming over allowed intermediate vertices.

AdvancedRead →
084⌁

Cycle Detection

Cycle Detection is a algorithm in the graphs family. This graph algorithm works over vertices and edges, usually using an adjacency list/matrix plus explicit state such as visited, distance, parent or indegree.

AdvancedRead →
085⌁

Prim's Algorithm

Prim grows one minimum spanning tree outward from a chosen start vertex, repeatedly adding the cheapest edge that connects the current tree to a new vertex.

AdvancedRead →
086⌁

Topological Sorting

Topological sorting produces a linear order of a directed acyclic graph (DAG) such that every directed edge u→v places u before v.

AdvancedRead →
087⌁

Articulation Points

Articulation Points is a algorithm in the graphs family. This graph algorithm works over vertices and edges, usually using an adjacency list/matrix plus explicit state such as visited, distance, parent or indegree.

AdvancedRead →
088⌁

Bridges

Bridges is a algorithm in the graphs family. This graph algorithm works over vertices and edges, usually using an adjacency list/matrix plus explicit state such as visited, distance, parent or indegree.

AdvancedRead →
089⌁

Eulerian Path & Circuit

Eulerian Path & Circuit is a algorithm in the graphs family. This graph algorithm works over vertices and edges, usually using an adjacency list/matrix plus explicit state such as visited, distance, parent or indegree.

AdvancedRead →
090⌁

Hamiltonian Cycle

Hamiltonian Cycle is a algorithm in the graphs family. This graph algorithm works over vertices and edges, usually using an adjacency list/matrix plus explicit state such as visited, distance, parent or indegree.

AdvancedRead →
091⌁

Strongly Connected Components — Kosaraju

Kosaraju finds strongly connected components in a directed graph using two DFS passes and the transposed graph.

AdvancedRead →
092⌁

Travelling Salesman Problem

Travelling Salesman Problem is a algorithm in the graphs family. This graph algorithm works over vertices and edges, usually using an adjacency list/matrix plus explicit state such as visited, distance, parent or indegree.

AdvancedRead →
093⌁

Polynomial Hash

Polynomial Hash is a algorithm in the cryptography family. This educational cipher/hash demonstrates a transformation over symbols or numeric state. It is useful for learning, but many classic ciphers are not secure for real systems.

BeginnerRead →
094⌁

Rail Fence Cipher

Rail Fence Cipher is a algorithm in the cryptography family. This educational cipher/hash demonstrates a transformation over symbols or numeric state. It is useful for learning, but many classic ciphers are not secure for real systems.

BeginnerRead →
095⌁

Caesar Cipher

Caesar Cipher is a algorithm in the cryptography family. This educational cipher/hash demonstrates a transformation over symbols or numeric state. It is useful for learning, but many classic ciphers are not secure for real systems.

BeginnerRead →
096⌁

Hill Cipher

Hill Cipher is a algorithm in the cryptography family. This educational cipher/hash demonstrates a transformation over symbols or numeric state. It is useful for learning, but many classic ciphers are not secure for real systems.

BeginnerRead →
097⌁

NanoNeuron

NanoNeuron is a algorithm in the machine learning family. This learning algorithm turns examples/data into a rule, grouping or prediction based on a distance, objective or simple model.

BeginnerRead →
098⌁

k-NN

k-NN is a algorithm in the machine learning family. This learning algorithm turns examples/data into a rule, grouping or prediction based on a distance, objective or simple model.

BeginnerRead →
099⌁

k-Means

k-Means is a algorithm in the machine learning family. This learning algorithm turns examples/data into a rule, grouping or prediction based on a distance, objective or simple model.

BeginnerRead →
100⌁

Seam Carving

Seam Carving is a algorithm in the image processing family. Seam carving resizes an image by removing or inserting low-energy paths rather than uniformly scaling every pixel.

BeginnerRead →
101⌁

Weighted Random

Weighted Random is a algorithm in the statistics family. This statistical sampling method converts weights into probabilities and samples accordingly.

BeginnerRead →
102⌁

Genetic Algorithm

Genetic Algorithm is a algorithm in the evolutionary algorithms family. A genetic algorithm searches a large solution space using populations, fitness, selection, crossover and mutation.

AdvancedRead →
103⌁

Tower of Hanoi

Tower of Hanoi is a algorithm in the classic problems family. This classic interview problem is mainly about recognizing the right pattern—two pointers, stack, greedy, DP or backtracking—rather than memorizing one code listing.

BeginnerRead →
104⌁

Square Matrix Rotation

Square Matrix Rotation is a algorithm in the classic problems family. This classic interview problem is mainly about recognizing the right pattern—two pointers, stack, greedy, DP or backtracking—rather than memorizing one code listing.

BeginnerRead →
105⌁

Jump Game

Jump Game is a algorithm in the classic problems family. This classic interview problem is mainly about recognizing the right pattern—two pointers, stack, greedy, DP or backtracking—rather than memorizing one code listing.

BeginnerRead →
106⌁

Unique Paths

Unique Paths is a algorithm in the classic problems family. This classic interview problem is mainly about recognizing the right pattern—two pointers, stack, greedy, DP or backtracking—rather than memorizing one code listing.

BeginnerRead →
107⌁

Rain Terraces / Trapping Rain Water

Trapping Rain Water asks how much water can sit above bars after rain. Water above index i is limited by the smaller of the tallest bar on its left and right.

BeginnerRead →
108⌁

Recursive Staircase

Recursive Staircase is a algorithm in the classic problems family. This classic interview problem is mainly about recognizing the right pattern—two pointers, stack, greedy, DP or backtracking—rather than memorizing one code listing.

BeginnerRead →
109⌁

Best Time to Buy/Sell Stocks

For the one-transaction stock problem, scan once while tracking the minimum price seen so far and the best profit achievable by selling today.

BeginnerRead →
110⌁

Valid Parentheses

Valid Parentheses checks whether every opening bracket is closed by the matching bracket in the correct nesting order. A stack models that nesting naturally.

BeginnerRead →
111⌁

N-Queens Problem

N-Queens places N queens on an N×N chessboard so that no two share a row, column or diagonal. Backtracking explores choices and abandons partial boards as soon as a conflict appears.

AdvancedRead →
112⌁

Knight's Tour

Knight's Tour is a algorithm in the classic problems family. This classic interview problem is mainly about recognizing the right pattern—two pointers, stack, greedy, DP or backtracking—rather than memorizing one code listing.

AdvancedRead →
Arian Soleimanzadeh

Personal portfolio focused on modern web engineering, UI systems, and practical AI products — clean code, clean design.

Quick Links

  • About
  • Blog
  • Library
  • Contact

Contact

  • soleimanzadeh.a.work@gmail.com
  • soleimanzadeh.uni@gmail.com

Availability: Weekdays

Typically replies within 24h.

Newsletter

Get updates on posts, projects, and new releases.

© 2026 ariansoleimanzadeh.dev — All rights reserved.

LinkedIn