Arian Soleimanzadeh
  • 首页
  • 博客
  • 播客
  • 视频
  • 图书馆
  • 联系
العربيةArabic
DeutschGerman
EnglishEnglish
فارسیPersian
한국어Korean
中文Chinese
面板•快速联系

Languages

Choose your interface locale

ar

العربية

Arabic

de

Deutsch

German

en

English

English

fa

فارسی

Persian

ko

한국어

Korean

zh

中文

Chinese

预约咨询

发送一条简短消息——我会尽快回复。

LinkedIn快速回复
算法与数据结构资料库

把算法当作可读的思想来理解,代码就在旁边。

浏览受 trekhleb 启发的主题目录。每一页现在都是完整的双语课程:简单解释、执行步骤、复杂度、易读 JavaScript、面试提示、常见错误和延伸阅读。

112阅读主题
19数据结构
93算法
15分类
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.

初级阅读 →
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.

初级阅读 →
003⌁

Queue

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

初级阅读 →
004⌁

Stack

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

初级阅读 →
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.

初级阅读 →
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.

初级阅读 →
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.

初级阅读 →
008⌁

Priority Queue

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

初级阅读 →
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.

高级阅读 →
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.

高级阅读 →
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.

高级阅读 →
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.

高级阅读 →
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.

高级阅读 →
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.

高级阅读 →
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.

高级阅读 →
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.

高级阅读 →
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.

高级阅读 →
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.

高级阅读 →
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.

高级阅读 →
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.

初级阅读 →
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.

初级阅读 →
022⌁

Factorial

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

初级阅读 →
023⌁

Fibonacci Number

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

初级阅读 →
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.

初级阅读 →
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.

初级阅读 →
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.

初级阅读 →
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.

初级阅读 →
028⌁

Sieve of Eratosthenes

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

初级阅读 →
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.

初级阅读 →
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.

初级阅读 →
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.

初级阅读 →
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.

初级阅读 →
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.

初级阅读 →
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.

初级阅读 →
035⌁

Matrices

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

初级阅读 →
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.

初级阅读 →
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.

高级阅读 →
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.

高级阅读 →
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.

高级阅读 →
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.

高级阅读 →
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.

初级阅读 →
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.

初级阅读 →
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.

高级阅读 →
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.

高级阅读 →
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.

高级阅读 →
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.

高级阅读 →
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.

高级阅读 →
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.

高级阅读 →
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.

高级阅读 →
050⌁

Maximum Subarray

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

高级阅读 →
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.

高级阅读 →
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.

初级阅读 →
053⌁

Palindrome

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

初级阅读 →
054⌁

Levenshtein Distance

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

高级阅读 →
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.

高级阅读 →
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.

高级阅读 →
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.

高级阅读 →
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.

高级阅读 →
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.

高级阅读 →
060⌁

Linear Search

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

初级阅读 →
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.

初级阅读 →
062⌁

Binary Search

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

初级阅读 →
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.

初级阅读 →
064⌁

Bubble Sort

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

初级阅读 →
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.

初级阅读 →
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.

初级阅读 →
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.

初级阅读 →
068⌁

Merge Sort

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

初级阅读 →
069⌁

Quicksort

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

初级阅读 →
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.

初级阅读 →
071⌁

Counting Sort

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

初级阅读 →
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.

初级阅读 →
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.

初级阅读 →
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.

初级阅读 →
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.

初级阅读 →
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.

初级阅读 →
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.

初级阅读 →
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.

初级阅读 →
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.

初级阅读 →
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.

初级阅读 →
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.

高级阅读 →
082⌁

Bellman–Ford Algorithm

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

高级阅读 →
083⌁

Floyd–Warshall Algorithm

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

高级阅读 →
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.

高级阅读 →
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.

高级阅读 →
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.

高级阅读 →
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.

高级阅读 →
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.

高级阅读 →
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.

高级阅读 →
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.

高级阅读 →
091⌁

Strongly Connected Components — Kosaraju

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

高级阅读 →
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.

高级阅读 →
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.

初级阅读 →
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.

初级阅读 →
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.

初级阅读 →
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.

初级阅读 →
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.

初级阅读 →
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.

初级阅读 →
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.

初级阅读 →
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.

初级阅读 →
101⌁

Weighted Random

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

初级阅读 →
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.

高级阅读 →
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.

初级阅读 →
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.

初级阅读 →
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.

初级阅读 →
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.

初级阅读 →
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.

初级阅读 →
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.

初级阅读 →
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.

初级阅读 →
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.

初级阅读 →
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.

高级阅读 →
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.

高级阅读 →
Arian Soleimanzadeh

个人作品集,聚焦现代 Web 工程、UI 系统与实用型 AI 产品——干净的代码,清晰的设计。

快速链接

  • 关于
  • 博客
  • 图书馆
  • 联系

联系

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

可联系时间: 工作日

通常回复时间在 24小时内。

订阅通讯

获取文章、项目与新版本发布的更新。

© 2026 ariansoleimanzadeh.dev — 保留所有权利。

LinkedIn