Can you find the optimal route for the trolly?

This page summarizes the projects mentioned and recommended in the original post on /r/ProgrammerHumor

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • Advent-of-Code-2021

    Solutions for Advent of Code 2021 (by agubelu)

  • awesome-advent-of-code

    A collection of awesome resources related to the yearly Advent of Code challenge.

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • PathFinding.js

    A comprehensive path-finding library for grid based games

  • Jokes aside, I started this year and solved a couple of problems like this. I really liked the challenged, discovered and read about something called graphs in mathematics and Hamiltonian paths. There is a simple part and an algorithm part. The simple part is "listing" all the dots there. Imagine a table of elements, every dot has its sub- table with its name and connections (where you have a list of all the other Dots you could directly go from this one). Then comes the algorithm, which can be as elaborate as you want. Usually, if you don't mind performance time, it becomes simple since you only need to tell the program "start here, end here, go through all possible paths and give me the shortest one" Then, if you need to have a better performance, you adapt one of the many know algorithms for pathfinding, like the dikjistra one. For those, when adapted into your code, you "just" give them your table of dots with their connections and they will return you the "shortest" path, or the first they found, depending on the algorithm. The challenge I found most useful to understand this was from codewars. https://www.codewars.com/kata/5a667236145c462103000091 And here you can se a demonstration of those algorithms (just imagine that every square, in this case, would be one of those dots and instead of 4 connections they have the ones showed here) https://qiao.github.io/PathFinding.js/visual/

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts