diff --git a/Graphs/BFS.py b/graphs/BFS.py similarity index 100% rename from Graphs/BFS.py rename to graphs/BFS.py diff --git a/Graphs/DFS.py b/graphs/DFS.py similarity index 100% rename from Graphs/DFS.py rename to graphs/DFS.py diff --git a/Graphs/Directed and Undirected (Weighted) Graph.py b/graphs/Directed and Undirected (Weighted) Graph.py similarity index 100% rename from Graphs/Directed and Undirected (Weighted) Graph.py rename to graphs/Directed and Undirected (Weighted) Graph.py diff --git a/Graphs/a_star.py b/graphs/a_star.py similarity index 100% rename from Graphs/a_star.py rename to graphs/a_star.py diff --git a/Graphs/articulation_points.py b/graphs/articulation_points.py similarity index 100% rename from Graphs/articulation_points.py rename to graphs/articulation_points.py diff --git a/Graphs/basic_graphs.py b/graphs/basic_graphs.py similarity index 100% rename from Graphs/basic_graphs.py rename to graphs/basic_graphs.py diff --git a/Graphs/bellman_ford.py b/graphs/bellman_ford.py similarity index 100% rename from Graphs/bellman_ford.py rename to graphs/bellman_ford.py diff --git a/Graphs/breadth_first_search.py b/graphs/breadth_first_search.py similarity index 100% rename from Graphs/breadth_first_search.py rename to graphs/breadth_first_search.py diff --git a/Graphs/check_bipartite_graph_bfs.py b/graphs/check_bipartite_graph_bfs.py similarity index 100% rename from Graphs/check_bipartite_graph_bfs.py rename to graphs/check_bipartite_graph_bfs.py diff --git a/Graphs/depth_first_search.py b/graphs/depth_first_search.py similarity index 100% rename from Graphs/depth_first_search.py rename to graphs/depth_first_search.py diff --git a/Graphs/dijkstra.py b/graphs/dijkstra.py similarity index 100% rename from Graphs/dijkstra.py rename to graphs/dijkstra.py diff --git a/Graphs/dijkstra_2.py b/graphs/dijkstra_2.py similarity index 100% rename from Graphs/dijkstra_2.py rename to graphs/dijkstra_2.py diff --git a/Graphs/dijkstra_algorithm.py b/graphs/dijkstra_algorithm.py similarity index 100% rename from Graphs/dijkstra_algorithm.py rename to graphs/dijkstra_algorithm.py diff --git a/Graphs/even_tree.py b/graphs/even_tree.py similarity index 100% rename from Graphs/even_tree.py rename to graphs/even_tree.py diff --git a/Graphs/finding_bridges.py b/graphs/finding_bridges.py similarity index 100% rename from Graphs/finding_bridges.py rename to graphs/finding_bridges.py diff --git a/Graphs/floyd_warshall.py b/graphs/floyd_warshall.py similarity index 100% rename from Graphs/floyd_warshall.py rename to graphs/floyd_warshall.py diff --git a/Graphs/graph.py b/graphs/graph.py similarity index 100% rename from Graphs/graph.py rename to graphs/graph.py diff --git a/Graphs/graph_list.py b/graphs/graph_list.py similarity index 100% rename from Graphs/graph_list.py rename to graphs/graph_list.py diff --git a/Graphs/graph_matrix.py b/graphs/graph_matrix.py similarity index 100% rename from Graphs/graph_matrix.py rename to graphs/graph_matrix.py diff --git a/Graphs/kahns_algorithm_long.py b/graphs/kahns_algorithm_long.py similarity index 100% rename from Graphs/kahns_algorithm_long.py rename to graphs/kahns_algorithm_long.py diff --git a/Graphs/kahns_algorithm_topo.py b/graphs/kahns_algorithm_topo.py similarity index 100% rename from Graphs/kahns_algorithm_topo.py rename to graphs/kahns_algorithm_topo.py diff --git a/Graphs/minimum_spanning_tree_kruskal.py b/graphs/minimum_spanning_tree_kruskal.py similarity index 100% rename from Graphs/minimum_spanning_tree_kruskal.py rename to graphs/minimum_spanning_tree_kruskal.py diff --git a/Graphs/minimum_spanning_tree_prims.py b/graphs/minimum_spanning_tree_prims.py similarity index 100% rename from Graphs/minimum_spanning_tree_prims.py rename to graphs/minimum_spanning_tree_prims.py diff --git a/Graphs/multi_hueristic_astar.py b/graphs/multi_hueristic_astar.py similarity index 100% rename from Graphs/multi_hueristic_astar.py rename to graphs/multi_hueristic_astar.py diff --git a/Graphs/scc_kosaraju.py b/graphs/scc_kosaraju.py similarity index 100% rename from Graphs/scc_kosaraju.py rename to graphs/scc_kosaraju.py diff --git a/Graphs/tarjans_scc.py b/graphs/tarjans_scc.py similarity index 100% rename from Graphs/tarjans_scc.py rename to graphs/tarjans_scc.py diff --git a/Maths/3n+1.py b/maths/3n+1.py similarity index 100% rename from Maths/3n+1.py rename to maths/3n+1.py diff --git a/Maths/FindMax.py b/maths/FindMax.py similarity index 100% rename from Maths/FindMax.py rename to maths/FindMax.py diff --git a/Maths/FindMin.py b/maths/FindMin.py similarity index 100% rename from Maths/FindMin.py rename to maths/FindMin.py diff --git a/Maths/abs.py b/maths/abs.py similarity index 100% rename from Maths/abs.py rename to maths/abs.py diff --git a/Maths/absMax.py b/maths/absMax.py similarity index 100% rename from Maths/absMax.py rename to maths/absMax.py diff --git a/Maths/absMin.py b/maths/absMin.py similarity index 100% rename from Maths/absMin.py rename to maths/absMin.py diff --git a/Maths/average.py b/maths/average.py similarity index 100% rename from Maths/average.py rename to maths/average.py diff --git a/Maths/extended_euclidean_algorithm.py b/maths/extended_euclidean_algorithm.py similarity index 100% rename from Maths/extended_euclidean_algorithm.py rename to maths/extended_euclidean_algorithm.py diff --git a/maths/factorial_recursive.py b/maths/factorial_recursive.py new file mode 100644 index 000000000..41391a271 --- /dev/null +++ b/maths/factorial_recursive.py @@ -0,0 +1,13 @@ +def fact(n): + """ + Return 1, if n is 1 or below, + otherwise, return n * fact(n-1). + """ + return 1 if n <= 1 else n * fact(n-1) + +""" +Shown factorial for i, +where i ranges from 1 to 20. +""" +for i in range(1,21): + print(i, ": ", fact(i), sep='') diff --git a/Maths/find_lcm.py b/maths/find_lcm.py similarity index 100% rename from Maths/find_lcm.py rename to maths/find_lcm.py