-
Trình Thực Thi
Trình biên dịch Python Trình biên dịch C++ Trình biên dịch C Trình biên dịch Matplotlib Trình thông dịch Node.js Trình thông dịch PHP Trình biên dịch C# / .NET Trình biên dịch Rust Ruby Interpreter Trình biên dịch Java Trình biên dịch Go Trình biên dịch Kotlin Trình biên dịch Swift Trình biên dịch TypeScript
-
Học lập trình
Trung tâm học Python Ví dụ chạy được, NumPy, pandas và nhiều nội dung khác Trung tâm học C và C++ Con trỏ, bộ nhớ, STL và C++ hiện đại Trung tâm học C#C# cơ bản, OOP, LINQ, async và bài tập .NET Thuật toán Python Tìm kiếm, sắp xếp, đệ quy và trình mô phỏng O(n) Thuật toán C và C++ So sánh cách cài đặt bằng C và C++
- Thử thách
Visualizers
Sorting Algorithm Visualizer
See how classic sorting algorithms work, one comparison and swap at a time.
- Runs in your browser
- Instant results
- Free, no sign-up
Loading the tool…
How to use the Sorting Algorithm Visualizer
- Choose an algorithm, the number of elements and the starting data.
- Press Play, or Step to go one operation at a time.
- Compare comparisons, swaps and the complexity table between algorithms.
Frequently asked questions
Which sorting algorithm is fastest?
On random data, quick, merge and heap sort (O(n log n)) beat the O(n²) sorts. Insertion sort wins on nearly sorted data.
What does stable mean?
A stable sort keeps equal values in their original order, which matters when sorting records by one field.
Why try different starting data?
Some algorithms behave very differently on sorted, reversed or repetitive input; quick sort's worst case shows on sorted data.
Luyện Python với thử thách lập trình
Giải các bài tập thực tế ngay trên trình soạn thảo này: chạy kiểm thử mẫu, nộp bài và nhận đánh giá code từ AI.