Please sign in to access this page

Learning Algorithms

Learning Algorithms

40 devlogs
152h 10m
•  Ship certified
Created by Pakdad Mousavi

An open-source website explaining different types of algorithms, with step by step illustrations and results for any data you'd like to try the algorithm with!

Timeline

Worked on the merge sort algorithm, still a while to go before I get the visualizer up and running though

Update attachment

Added the insertion sort algorithm!!

Update attachment

Ship 2

0 payouts of shell 0 shells

Pakdad Mousavi

7 days ago

Pakdad Mousavi Covers 8 devlogs and 43h 1m

Worked on adding the bubble sort algorithm to the project! also finally finished the search :>

Update attachment

worked on the search design and implementation x-x creating a working search panel should not need this much work lol but at least its working now, and looking good :> still a few more kinks to fix and we're uploading it

Update attachment

Planning on implementing a searchbar! Worked on generating a json file worth of algolia records and re-indexing them in my project using a github workflow (I love automation) :>

Update attachment

Added a tab footer for enhanced navigation between different tabs :>

Update attachment

Added the tab footer component to the algorithm pages, for enhanced navigation between tabs, still got work to do though, i need to make sure it's only visible if the main tab header is out of view.

and still need to make it responsive ;-;

Update attachment

Finally remodeled the banker's algorithm theory, complete with self-drawn diagrams and detailed explanations to create a strong understanding of the algorithm :D

Added a blurry loading screen to show users if changing pages takes longer than 50ms! Also began working on remodeling the banker's algorithm :>

Update attachment

Updated the theory with better diagrams, less text, and optimized explanations for the round robin, fcfs and priority scheduling algorithms :D

Still need to update two more algorithms though

Update attachment

Ship 1

1 payout of shell 2342.0 shells

Pakdad Mousavi

21 days ago

Pakdad Mousavi Covers 30 devlogs and 97h 38m

Created and added the C-SCAN algorithm to the project, a variant of the SCAN algorithm :>

Update attachment

Added the LOOK algorithm and created visuals for the C-SCAN algorithm in figma :>

Update attachment

Worked on creating a dynamically generated seek time graph using an svg! Lead to some pretty cool animations :>

Worked on adding the theory needed for the FCFS disk scheduling algorithm.

Update attachment

Figma figure development for secondary disk scheduling algorithms!

Update attachment

Added the optimal algorithm to the project!

Update attachment

Updated the generate:algorithm script to include additional questions and a final confirmation at the end! makes it so much easier to create a new algorithm, so much less to worry about :)

Update attachment

Added the logic for the other page replacement algorithms today, and worked on cleaning up some obsolete logic by refactoring my code :)

Update attachment

Finally finished the algorithm, as well as the component needed for my FIFO page replacement algorithm (and also others), pretty happy with how the project is turning out now :>

Update attachment

Devlog to register my earlier figma work!

Update attachment

Added the theory part under the FIFO page replacement algorithm, I spent a good amount of time (3hrs+) designing the diagrams in figma, but for some reason it doesn't register :<

still made lots of progress though

Update attachment

Designed tons of diagrams for virtual memory management in figma, to properly explain how it works :>

Update attachment

Updated the readme for contributors, as well as the .vscode extenstions.json and settings.json files :>

Update attachment

Forgot to do a devlog yesterday! Added the worst fit algorithm and then proceeded to create a tabswitcher component to manage which tab to show and when (separation of concerns is important :>).

And so far today, I've created a script to create an algorithm template so that adding new algorithms is much easier. It adds a new route in the router and also creates a view file for the algorithm content itself. Great for contributors!

Update attachment

added the first fit algorithm logic, as well as the best fit along with the theory needed for each one :)

Update attachment

Worked on implementing and designing the visuals for the first fit algorithm, almost done! :)

Update attachment

Worked on adding the first fit algorithm, complete with better visuals to make it easier to understand (images made by myself in figma!)

Update attachment

Created a tab header component to switch between algorithm theory and algorithm visualizer, it was too crowded earlier and difficult to see the visualizer, but now it has its own dedicated space. :>

Update attachment

Deploy the project on github pages! :D

Update attachment

created a different layout for the navbar and sidebar in the page, create the home page, added in a footer, and finally created CI/CD workflows on github to automatically upload the built dist files to github pages. :)

Update attachment

cleaned up some comp code, made the banner update the active algorithm, added titles to each page, and updated the group tree to render from router routes instead of a different variable.

Update attachment

Today i made the navbar responsive and prettified it to ensure it looked good, i also added a button linking it to my github.

i decided to make the navbar sticky since it looked better, and then i just spent the rest of the day cleaning up my code and removing unnecessary features, like minimizing all of the menus.

Update attachment

was working on adding the logo and fixing the sidebar, but i was also really busy splitting the code for the new algorithm into components

also moved the actual algorithm logic to a composable so that the view was cleaner

Update attachment

okay so today i updates the readme of the project, and then i added the step by step version of the bankers algorithm :>

Update attachment

Worked on adding the inputs and the algorithm logic to the project! Took some time but i got it working with clean code :> now i need to figure out how im going to display the results .-.

Update attachment

so far, i've added the theory knowledge needed for the bankers algorithm under deadlock management, basically what are deadlocks, how they happen, what the bankers algorithm is and how it works. i've also included a step by step procedure on how the algorithm can be executed manually, along with some pretty neat diagrams :>

next, ill be working on the actual algorithm implementation, still not sure how im going to display the result though :/ need to put some thought into that one

Update attachment

Ran into a weird bug when switching between different process arrival setups in the Gantt chart, when going from all processes arriving at time 0 to staggered arrivals like 1, 2, 3, 4. The UI broke because entry[1] became undefined during the switch, causing the process bar component to crash.

Tracked it down to 2 computed() statements, where i used a plain consts instead ;-;

Now the component handles consecutive runs without crashing, even if the data structure changes drastically.

i also added the shortest job first algorithm , pretty simple to do considering i already had the model for the fcfs and priority algorithms. but it was repetitive logic which ran in all 3 components so i created a composable to extract the logic and generalize it, much cleaner now :)

Update attachment

Started working on the Priority Scheduling algorithm today!

In this version, each process is assigned a priority number. The lower the number, the higher the priority. So instead of just going by arrival time like in FCFS, the CPU picks the process with the highest priority among the ones that have arrived.

It was fairly simple as I already had the FCFS algorithm, all I needed to do was sort the queue based on the priority given to it whenever a new process arrived.

Update attachment

Got the first come first serve (FCFS) algorithm working today!

The core of the algorithm is in, it loops through each millisecond of time, checks which processes have arrived, and runs them one by one in the order they showed up. Just like the name says: whoever comes first gets the CPU first, no interruptions.

One small bug I ran into was with the current process getting reset every loop, so each process was only running for 1ms before disappearing 😅. Turns out I was re-initializing currentProcess inside the loop and using an empty array instead of null, which made my condition checks fail. Once I moved it outside and properly tracked whether a process was still running, everything started falling into place.

Update attachment

Devlog: Gantt Chart Legend + FCFS Progress

First, I finally added a legend to the Gantt chart for the Round Robin scheduling algorithm. It was something I’d been meaning to do for a while to make the chart more readable. Now each part of the process is clearly identified, so it’s way easier to understand what’s going on at a glance.

After that, I started working on the next scheduling algorithm: first come first serve (FCFS). I’ve set up the main overview section, which explains how FCFS works and what makes it different from Round Robin. The UI and logic are still a work in progress, but the base is there and it's coming together nicely.

More updates soon once FCFS is fully wired up and visualized!

Update attachment