Interactive Learning Platform

Algorithm VisionMaster Algorithms

インタラクティブアルゴリズム可視化プラットフォーム

インタラクティブな可視化、包括的な説明、複数の言語でのコード例を通じて、アルゴリズムとデータ構造をマスターしましょう。コンピュータサイエンスを学ぶ学生、技術面接の準備をする開発者、アルゴリズムの概念を教える教育者に最適です。

ステップバイステップの可視化

Step-by-step interactive visualizations help you understand how algorithms work

JavaScript、Python、Javaのコード

Implementation examples in JavaScript, Python, and Java for practical learning

時間と空間の複雑度分析

Understand time and space complexity with detailed performance analysis

ソートアルゴリズム

比較ベースのアルゴリズム(バブルソート、クイックソート、マージソート、ヒープソート)と線形時間ソート(カウンティングソート、基数ソート)でデータを整理する技術をマスターしましょう。安定ソートと不安定ソートの使い分け、時間と空間のトレードオフを理解し、データベース、検索エンジン、データ処理パイプラインでの実際の応用例を学びます。

すべて表示

バブルソート

Beginner

隣接する要素を繰り返し比較し、順序が間違っている場合に交換する最も基本的なソートアルゴリズムです。泡が水面に上がるように、大きな値が徐々に配列の末尾に移動します。小規模なデータセットやソートの基礎を理解するための教育目的に最適です。

O(n²)
O(1)
sortingcomparison
Start Learning

選択ソート

Beginner

最小の要素を見つけて繰り返し前方に移動させます。各反復で残りの要素から最小値を「選択」し、ソート済み部分の後ろに配置します。メモリ使用量は最小限でシンプルに実装できますが、入力に関係なく常にO(n²)の時間がかかります。

O(n²)
O(1)
sortingcomparison
Start Learning

クイックソート

Intermediate

ピボット要素を選択し、小さい値を左側、大きい値を右側に配置して配列を分割する非常に効率的なソートアルゴリズムです。平均O(n log n)で、実際に最も広く使用されているソート方法です。ほとんどのプログラミング言語の組み込みソート関数の基盤となっています。

O(n log n)
O(log n)
sortingdivide-and-conquer
Start Learning

ヒープソート

Advanced

最大ヒープを構築し、ルート要素を繰り返し抽出してソートする二分ヒープデータ構造を使用します。すべての場合でO(n log n)の時間計算量を保証し、追加メモリを必要としません。優先度付きキューの実装の基礎にもなっています。

O(n log n)
O(1)
sortingheap
Start Learning

Counting Sort

Intermediate

A non-comparison sorting algorithm that counts occurrences of each element and uses arithmetic to determine positions. Achieves O(n+k) time complexity where k is the range of input values. Ideal for sorting integers within a known, limited range. Forms the basis for radix sort.

O(n + k)
O(n + k)
sortinglinear-time
Start Learning

Radix Sort

Advanced

A non-comparison sorting algorithm that processes elements digit by digit from least significant to most significant. Uses counting sort as a subroutine for each digit position. Achieves O(d(n+k)) time where d is the number of digits. Excellent for sorting integers or fixed-length strings.

O(d * n)
O(n + k)
sortinglinear-time
Start Learning

Shell Sort

Intermediate

An optimization of insertion sort that allows exchange of elements that are far apart. Uses a gap sequence that decreases to 1, enabling the algorithm to move elements closer to their final positions faster. Named after Donald Shell who invented it in 1959.

O(n^1.25)
O(1)
sortinggap-sequence
Start Learning

Bucket Sort

Advanced

A distribution-based sorting algorithm that distributes elements into a number of buckets. Each bucket is then sorted individually using another sorting algorithm. Works best when input is uniformly distributed over a range. Average time complexity is O(n+k).

O(n + k)
O(n + k)
sortingdistribution-sort
Start Learning

マージソート

Intermediate

配列を半分に分割し、各半分を再帰的にソートしてから結合する分割統治アルゴリズムです。O(n log n)の時間を保証し、安定ですが、追加メモリが必要です。大規模なデータセットや連結リストのソートに特に効果的です。

O(n log n)
O(n)
sortingdivide-and-conquer
Start Learning

挿入ソート

Beginner

手札のカードをソートするように、各要素を一度に適切な位置に挿入します。既にソート済みのデータに対してO(n)時間で実行されるため、小規模な配列やほぼソート済みのデータセットに非常に効率的です。シンプルながら適応的なアルゴリズムです。

O(n²)
O(1)
sortingstable
Start Learning

Comb Sort

Beginner

Improvement over bubble sort that eliminates small values near the end of the list (turtles). Uses a shrinking gap sequence starting with array length, improving worst-case complexity. Practical for medium-sized datasets where simple implementation is valued over optimal performance.

O(n²/2^p)
O(1)
sortinggap-sequence
Start Learning

Gnome Sort

Beginner

Simple sorting algorithm similar to insertion sort, named after the way garden gnomes sort flower pots. Moves backward when elements are out of order, then forward again. While O(n²) like bubble sort, its simplicity makes it useful for teaching sorting concepts and handling small datasets.

O(n²)
O(1)
sortingsimple-algorithm
Start Learning

探索アルゴリズム

データ構造内の要素を効率的に見つける技術を学びましょう。未ソートデータの線形探索(O(n))とソート済み配列の二分探索(O(log n))を比較します。補間探索やジャンプ探索などの高度な手法を学び、探索アルゴリズムがデータベースからオートコンプリートシステムまであらゆるものを支えている仕組みを理解します。

すべて表示

グラフアルゴリズム

接続されたデータ構造上の複雑な問題を解決するアルゴリズムを探求します。BFSとDFSでグラフ走査をマスターし、ダイクストラ法やベルマン・フォード法で最短経路を見つけ、クラスカル法やプリム法で最小全域木を計算します。GPS ナビゲーション、ソーシャルネットワーク、ネットワークルーティングなどの実世界の問題にこれらの概念を応用します。

すべて表示

幅優先探索(BFS)

Intermediate

グラフをレベルごとに探索し、より深く進む前に現在の深さのすべての頂点を訪問します。キューを使用し、重み付けされていないグラフでの最短経路を見つけるのに理想的です。迷路の解決、ソーシャルネットワーク分析、ノード間の接続の検索などの応用があります。

O(V + E)
O(V)
graphtraversal
Start Learning

深さ優先探索(DFS)

Intermediate

各経路に沿って可能な限り深く進んでから後戻りするグラフ探索方法です。スタックまたは再帰を使用して実装され、再帰的な問題に自然です。経路探索、サイクル検出、トポロジカルソート、迷路生成に使用されます。

O(V + E)
O(V)
graphtraversal
Start Learning

ダイクストラ法

Advanced

重み付きグラフで単一始点から他のすべての頂点への最短経路を見つけます。GPSナビゲーションシステムやネットワークルーティングプロトコルを支えています。優先度付きキューを使用した貪欲法により、非負の辺の重みで効率的に機能します。

O((V + E) log V)
O(V)
graphshortest-path
Start Learning

A* Search Algorithm

Advanced

A best-first search algorithm that finds the shortest path using heuristics. Combines Dijkstra's algorithm and greedy best-first search using f(n) = g(n) + h(n). Widely used in games, robotics, and GPS navigation for efficient pathfinding.

O(E)
O(V)
graphpathfinding
Start Learning

Kruskal's Algorithm

Advanced

Finds the Minimum Spanning Tree (MST) of a weighted undirected graph. Uses a greedy approach by sorting edges by weight and adding them if they don't create a cycle. Employs Union-Find for efficient cycle detection. Essential for network design and clustering.

O(E log E)
O(V)
graphmst
Start Learning

Prim's Algorithm

Intermediate

Finds the Minimum Spanning Tree (MST) by growing a tree from a starting vertex. Always adds the minimum weight edge connecting a vertex in the tree to one outside. Uses a priority queue for efficient edge selection. Ideal for dense graphs.

O(E log V)
O(V)
graphmst
Start Learning

Topological Sort

Intermediate

Orders vertices of a Directed Acyclic Graph (DAG) such that for every edge u→v, u comes before v. Uses DFS-based approach. Essential for dependency resolution, build systems, and course scheduling.

O(V + E)
O(V)
graphdag
Start Learning

PageRank

Advanced

Google's algorithm for ranking web pages by link structure. Computes importance scores iteratively.

O(iterations × (V + E))
O(V)
graphranking
Start Learning

Cycle Detection (Floyd's Algorithm)

Intermediate

Also known as the 'tortoise and hare' algorithm, this elegant technique detects cycles in linked lists or sequences using O(1) space. Uses two pointers moving at different speeds—if there's a cycle, they will eventually meet. Essential for detecting infinite loops, analyzing graph structures, and validating data integrity.

O(V + E)
O(V)
graphdfs
Start Learning

Bellman-Ford Algorithm

Advanced

Single-source shortest path algorithm that handles negative weights and detects negative cycles. Relaxes all edges V-1 times to guarantee correct distances even with negative weights. Essential for currency arbitrage detection, network routing with varied costs, and situations where Dijkstra's algorithm fails. Trades speed for flexibility.

O(V × E)
O(V)
graphshortest-path
Start Learning

Floyd-Warshall Algorithm

Advanced

All-pairs shortest path algorithm that computes distances between every pair of vertices in O(V³) time. Uses dynamic programming with elegant three-line core logic. Handles negative weights and provides transitive closure. Ideal for dense graphs, network analysis, and when all pairwise distances are needed.

O(V³)
O(V²)
graphall-pairs-shortest-paths
Start Learning

Kruskal's MST Algorithm

Intermediate

Greedy algorithm that builds a minimum spanning tree by adding edges in order of increasing weight, using union-find to avoid cycles. Efficient for sparse graphs with time complexity O(E log E). Applications include network design, clustering, approximation algorithms, and understanding greedy correctness proofs.

O(E log E)
O(V)
graphminimum-spanning-tree
Start Learning

Prim's MST Algorithm

Intermediate

Greedy algorithm that grows a minimum spanning tree by repeatedly adding the cheapest edge connecting the tree to a new vertex. Uses a priority queue for efficiency with O(E log V) time. Preferred for dense graphs and real-time applications like network broadcasting and circuit design.

O(E log V)
O(V)
graphminimum-spanning-tree
Start Learning

String Algorithms

Master efficient pattern matching and string manipulation techniques. Learn substring search algorithms like Knuth-Morris-Pratt (KMP) for O(n+m) pattern matching, Boyer-Moore for practical text searching, and Rabin-Karp for multiple pattern detection. These algorithms power text editors, search engines, DNA sequence analysis, and data validation systems.

すべて表示

動的計画法

複雑な最適化問題を重複する部分問題に分解して解決します。フィボナッチ数列、最長共通部分列、ナップサック問題、行列連鎖乗算などの古典的な問題を通じて、メモ化とボトムアップアプローチをマスターします。動的計画法が指数時間の解を多項式時間アルゴリズムに変換する方法を学びます。

すべて表示

Matrix Chain Multiplication

Advanced

Finds the optimal way to parenthesize a chain of matrices to minimize the number of scalar multiplications. Classic dynamic programming problem from CLRS Chapter 15.

O(n³)
O(n²)
dynamic-programmingoptimization
Start Learning

フィボナッチ数列(動的計画法)

Beginner

動的計画法を使用して冗長な計算を避けながらフィボナッチ数を効率的に計算します。メモ化の力を示し、指数時間の再帰的解を線形時間アルゴリズムに変換します。動的計画法の概念への古典的な入門です。

O(n)
O(n)
dynamic-programmingmemoization
Start Learning

最長共通部分列(LCS)

Intermediate

2つの列に同じ順序で存在する最長の部分列を見つけます。動的計画法を使用して解テーブルを構築します。DNA配列アライメント、ファイル差分ツール(diff)、盗作検出などの応用があります。

O(m × n)
O(m × n)
dynamic-programmingstrings
Start Learning

Edit Distance (Levenshtein)

Intermediate

Dynamic programming algorithm that calculates the minimum number of single-character edits (insertions, deletions, substitutions) required to transform one string into another. Fundamental in spell checking, DNA sequence alignment, and natural language processing.

O(m × n)
O(m × n)
dynamic-programmingstrings
Start Learning

0/1 Knapsack Problem

Intermediate

Classic dynamic programming problem where you must select items with given weights and values to maximize total value while staying within a weight capacity. Each item can only be taken once (0/1). Applications include resource allocation, portfolio optimization, and cargo loading.

O(n × W)
O(n × W)
dynamic-programmingoptimization
Start Learning

Longest Increasing Subsequence

Intermediate

Find the longest subsequence where all elements are in increasing order. Classic DP problem.

O(n log n)
O(n)
dynamic-programmingbinary-search
Start Learning

Kadane's Algorithm (Maximum Subarray)

Intermediate

Elegant dynamic programming algorithm that finds the contiguous subarray with maximum sum in O(n) time. Combines greedy and DP principles by deciding at each step whether to extend the current subarray or start a new one. Essential for stock profit optimization, signal processing, and understanding DP optimization techniques.

O(n)
O(1)
dynamic-programminggreedy
Start Learning

Coin Change Problem

Intermediate

Classic dynamic programming problem that finds the minimum number of coins needed to make a target amount. Demonstrates optimal substructure where the solution depends on solutions to smaller amounts. Widely applied in financial systems, vending machines, and resource allocation optimization.

O(amount × coins)
O(amount)
dynamic-programmingoptimization
Start Learning

Palindrome Partitioning

Advanced

Dynamic programming problem that finds the minimum number of cuts needed to partition a string into palindromic substrings. Uses DP to precompute which substrings are palindromes, then finds optimal cuts. Applications include text segmentation, DNA sequence analysis, and string optimization problems.

O(n²)
O(n²)
dynamic-programmingstrings
Start Learning

Backtracking Algorithms

Solve constraint satisfaction problems by systematically exploring all possible solutions and abandoning paths that fail to meet requirements. Master the N-Queens problem, Sudoku solvers, and combinatorial puzzles. Learn how backtracking elegantly handles complex decision trees where brute force becomes infeasible.

すべて表示

Mathematical Algorithms

Explore classical algorithms rooted in number theory and mathematics. Study prime number generation with the Sieve of Eratosthenes, understand GCD/LCM calculations, and discover how ancient mathematical insights translate into efficient modern algorithms. These form the foundation of cryptography, optimization, and computer science theory.

すべて表示

Machine Learning Algorithms

Discover fundamental unsupervised and supervised learning algorithms that power modern AI. Master K-Means clustering for data segmentation, understand decision trees for classification, and explore how algorithms learn patterns from data. Applications span customer analytics, image recognition, recommendation systems, and predictive modeling.

すべて表示

木構造アルゴリズム

データベース、ファイルシステム、検索操作を支える階層的データ構造の扱い方を学びます。二分探索木を理解し、O(log n)の操作を保証するAVL木や赤黒木などの自己平衡木を探求し、データ処理や式の評価に不可欠な木の走査技法(中順、前順、後順)をマスターします。

すべて表示

貪欲法

局所的に最適な選択を行い、全体的に最適な解を導き出します。活動選択問題、データ圧縮のためのハフマン符号化、分数ナップサック問題を学習します。貪欲法が機能する条件(最適部分構造+貪欲選択性)を理解し、スケジューリング、圧縮、ネットワーク最適化での応用を見ていきます。

すべて表示