Interactive Learning

Visualize
Sorting Flow

Witness the elegance of computational logic. Master Bubble, Merge, Insertion, and Selection sorts through immersive 3D simulations.

অ্যালগরিদমের লজিক বুঝুন সহজ বাংলায়।

Explore Algorithms

Core Algorithms

Detailed technical breakdowns with space-time complexity and bilingual logic explanation.

Selection Sort

O(n²)

Repeatedly finds the smallest element from the unsorted part and swaps it to the front.

এটি বারবার আনসর্টেড অংশ থেকে সবচেয়ে ছোট উপাদানটি খুঁজে বের করে এবং সেটিকে তালিকার শুরুতে নিয়ে আসে।

Space Complexity

O(1) Auxiliary

Stability

Unstable

Bubble Sort

O(n²)

Pairs of adjacent elements are compared, and they are swapped if they are in the wrong order.

এটি পাশাপাশি দুটি উপাদানের তুলনা করে এবং ভুল ক্রমে থাকলে তাদের জায়গা পরিবর্তন করে।

Best Case

O(n)

Stability

Stable

Insertion Sort

O(n²)

Builds the sorted array one item at a time by picking the next item and inserting it into place.

এটি একে একে প্রতিটি উপাদান নিয়ে তার বাম পাশের সর্টেড অংশে সঠিক অবস্থানে বসিয়ে দেয়।

Adaptive

Yes

Sorting

In-place

Merge Sort

O(n log n)

A recursive divide-and-conquer algorithm that splits the array and merges them back.

এটি অ্যারেকে অর্ধেক করে ভাগ করে এবং পরে সর্টেড অবস্থায় সেগুলোকে মার্জ করে।

Space Complexity

O(n)

Performance

Excellent

Efficiency Matrix

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)