Skip to content

vhogberg/sortinglab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SortingLab 🎮🔢

An interactive game-based learning experience designed to help computer science students master sorting algorithms in a fun and engaging way.

Try play it here: https://sortinglab.vercel.app

Overview

SortingLab transforms learning sorting algorithms from a theoretical exercise into an interactive challenge. Players can learn and practice different sorting techniques while competing against time, earning points, and developing their algorithm skills through practical application.

SortingLab Banner

Features

  • Multiple Sorting Algorithms: Learn and practice Bubble Sort, Insertion Sort, Selection Sort, Merge Sort, and more
  • Interactive Learning: Apply sorting algorithms step-by-step with visual feedback
  • Game Elements: Lives, time limits, and point systems to make learning engaging
  • Difficulty Levels: Easy (5 elements), Normal (10 elements), and Hard (15 elements)
  • Flexible Content: Sort numbers or letters based on your preference
  • Sandbox Mode: Practice sorting without algorithm constraints
  • Responsive Design: Optimized for both mobile and desktop layouts

How to Play

  1. Select a sorting algorithm from the main menu
  2. Each game presents unsorted elements that must be arranged according to the chosen algorithm
  3. Use the provided buttons to apply the sorting technique step by step
  4. Press Submit when you think the list is correctly sorted

Algorithms Included

Bubble Sort

  • Compare and swap adjacent elements if they're in the wrong order
  • Time Complexity: Best case O(n), Worst case O(n²)

Insertion Sort

  • Build a sorted list one element at a time
  • Time Complexity: Best case O(n), Worst case O(n²)

Selection Sort

  • Find the smallest element and move it to the correct position
  • Time Complexity: Always O(n²)

Merge Sort

  • Divide the list, sort the parts, and merge them back together
  • Time Complexity: Always O(n log n)

Sandbox Mode

  • Drag and drop elements freely to practice sorting techniques

Game Settings

  • Audio Effects: Toggle sound effects on/off
  • Lives: Start with three lives, lose one with each mistake
  • Time Limit: Challenge yourself to finish before time runs out
  • Points: Earn scores based on speed and accuracy

Technologies

  • HTML5
  • CSS3
  • JavaScript (Vanilla)
  • Responsive design for all device sizes

License

MIT License

About

SortingLab 🎮🔢 An interactive game-based learning experience designed to help computer science students master sorting algorithms in a fun and engaging way!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors