Josephu’s problem is a violent, albeit a really interesting mathematics’ problem. According to Wikipedia, during the Jewish-Roman wars, a Jewish historian named Flavious Josephus and his 40 soldiers were trapped in a cave fighting the Roman soldiers. When they were about to be captured, they decided that they had rather die than laying down the weapons and surrender to the Romans. Thus, they created a process for this sacrifice. The process was that they all would sit in a circle … Continue reading “Solving Josephus’s Problem using recursion”
Dijkstra’s Algorithm
Posted on April 12, 2020April 12, 2020Categories Uncategorized Leave a comment on Dijkstra’s AlgorithmDijkstra’s Algorithm is used to find the shortest path between two nodes of a weighted graph. The algorithm is pretty simple and goes as follows