Witness the elegance of computational logic. Master Bubble, Merge, Insertion, and Selection sorts through immersive 3D simulations.
অ্যালগরিদমের লজিক বুঝুন সহজ বাংলায়।
Detailed technical breakdowns with space-time complexity and bilingual logic explanation.
Repeatedly finds the smallest element from the unsorted part and swaps it to the front.
এটি বারবার আনসর্টেড অংশ থেকে সবচেয়ে ছোট উপাদানটি খুঁজে বের করে এবং সেটিকে তালিকার শুরুতে নিয়ে আসে।
Space Complexity
O(1) Auxiliary
Stability
Unstable
Pairs of adjacent elements are compared, and they are swapped if they are in the wrong order.
এটি পাশাপাশি দুটি উপাদানের তুলনা করে এবং ভুল ক্রমে থাকলে তাদের জায়গা পরিবর্তন করে।
Best Case
O(n)
Stability
Stable
Builds the sorted array one item at a time by picking the next item and inserting it into place.
এটি একে একে প্রতিটি উপাদান নিয়ে তার বাম পাশের সর্টেড অংশে সঠিক অবস্থানে বসিয়ে দেয়।
Adaptive
Yes
Sorting
In-place
A recursive divide-and-conquer algorithm that splits the array and merges them back.
এটি অ্যারেকে অর্ধেক করে ভাগ করে এবং পরে সর্টেড অবস্থায় সেগুলোকে মার্জ করে।
Space Complexity
O(n)
Performance
Excellent
Compare performance metrics across different scenarios.
| Algorithm | Best Case | Average | Worst | Space |
|---|---|---|---|---|
| Selection Sort | Ω(n²) | Θ(n²) | O(n²) | O(1) |
| Bubble Sort | Ω(n) | Θ(n²) | O(n²) | O(1) |
| Insertion Sort | Ω(n) | Θ(n²) | O(n²) | O(1) |
| Merge Sort | Ω(n log n) | Θ(n log n) | O(n log n) | O(n) |