This project is a front-end website designed to demonstrate the principles and implementations of various common sorting algorithms. It also provides an interactive quiz to test users' understanding of these algorithms. Through this website, users can browse the following content:
- Demonstration pages for various sorting algorithms (Bubble Sort, Counting Sort, Heap Sort, Insertion Sort, Merge Sort, Quick Sort, Radix Sort, Selection Sort).
- A main page that offers a brief introduction and links to the sorting algorithms.
- A login page to store and display user information (via localStorage).
- A random quiz page that allows users to test their knowledge of sorting algorithms, with a score and feedback displayed on the results page.
- An additional demonstration page that shows a simple implementation and flowchart for checking if a string is a Palindrome.
- Sorting Algorithm Demonstrations: Includes dynamic demonstrations of Bubble Sort, Selection Sort, Insertion Sort, Merge Sort, Quick Sort, Heap Sort, Counting Sort, and Radix Sort.
- Interactive Quiz: The random quiz page (
randomTest.html) provides multiple-choice questions, and the results page (result.html) displays the user's score and feedback for each question. - User Login: A simple login page (
login.html) allows users to enter a username and password, with the information stored inlocalStoragefor use on other pages. - Additional Demo: The
web1.htmlpage demonstrates palindrome checking with pseudocode, a flowchart, and related explanations for learning purposes.
sapt36-dynamicweb_sorting_algorithm/
└── Dynamic Web Final Project/
├── BubbleSort.html // Bubble Sort demo, showing sorting process and time complexity (O(n²))
├── CountingSort.html // Counting Sort demo, introducing its basic concepts and C language implementation
├── HeapSort.html // Heap Sort demo, showing how to achieve O(nlogn) efficiency using a heap structure
├── InsertionSort.html // Insertion Sort demo, explaining its principles and time complexity (O(n²))
├── MergeSort.html // Merge Sort demo, sorting via a divide-and-conquer strategy, with O(nlogn) time complexity
├── QuickSort.html // Quick Sort demo, introducing pivot and partitioning strategies, with an average time complexity of O(nlogn)
├── RadixSort.html // Radix Sort demo, sorting sequentially by digit, showing its time complexity and implementation details
├── SelectionSort.html // Selection Sort demo, demonstrating the process of sequentially selecting the smallest (or largest) element to sort
├── list.html // Main page, providing an overview and navigation links to all sorting algorithms
├── login.html // Login page where users can input username and password, storing info in localStorage
├── randomTest.html // Random quiz page with multiple-choice questions related to sorting algorithms
├── result.html // Quiz results page, displaying the user's score and feedback
└── web1.html // Additional demo page: Palindrome check with pseudocode, flowchart, and introduction
- Download or Clone the Project Files
- Download the entire
sapt36-dynamicweb_sorting_algorithmdirectory to your local computer. - Website link: https://sapt.neocities.org/
- Download the entire
- Open the Website
- You can directly open
login.htmlwith your browser as the home page to browse the demonstration pages for each sorting algorithm. - Alternatively, you can run the website using a local server (e.g., VS Code's Live Server extension) for a better interactive experience.
- You can directly open
- User Login and Quiz
- Click on
login.htmland enter your username and password (data will be stored inlocalStorage). - After logging in, you can go to
randomTest.htmlto take the sorting algorithm quiz, and view your score and feedback onresult.html.
- Click on
- Additional Features
- Click on
web1.htmlto browse the "Palindrome Check" demonstration, which includes pseudocode, a flowchart, and explanations for learning purposes.
- Click on
- Front-end Technologies: HTML5, CSS3, JavaScript
- External Frameworks and Libraries:
- Bootstrap 4.5.2: For quickly building responsive web pages and optimizing visual effects.
- jQuery 3.5.1: To simplify DOM manipulation and event handling.
- Popper.js: To support Bootstrap components like tooltips.
- Data Storage: Uses HTML5's
localStorageto access user login information and quiz results.
- Layout and Styles Using the Bootstrap framework and some custom CSS, you can modify the styles or adjust the page structure as needed.
- Functionality Expansion
If you need to demonstrate other sorting algorithms, you can create a new page and add a link in
list.html; to expand the quiz question bank, you can modify the JavaScript code inrandomTest.htmlandresult.html. - Interactive Features
The login and quiz functions are implemented using JavaScript and
localStorage, allowing users to modify the logic and interface design based on their needs.
- Browser Compatibility It is recommended to use a modern browser (e.g., Chrome, Firefox, Edge) for the best viewing experience.
- External Resource Dependency The website relies on Bootstrap, jQuery, and Popper.js from CDNs. Unstable network connections may affect the display of certain components.
- Data Privacy Login information is stored only on the user's local device and is not sent to the server. It is used for front-end demonstration purposes only.
Project Author
- Andrew Chen