diff --git a/algorithm/backtracking/knight's_tour/desc.json b/algorithm/backtracking/knight's_tour/desc.json index 2b4af117..cbc7e2fa 100644 --- a/algorithm/backtracking/knight's_tour/desc.json +++ b/algorithm/backtracking/knight's_tour/desc.json @@ -1,8 +1,8 @@ { "Knight’s tour problem": "A knight's tour is a sequence of moves of a knight on a chessboard such that the knight visits every square only once. If the knight ends on a square that is one knight's move from the beginning square (so that it could tour the board again immediately, following the same path), the tour is closed, otherwise it is open.", "Complexity": { - "time": "Worst O(8N2)", - "space": "Worst O(N2)" + "time": "Worst $$O(8^{N^{2}})$$", + "space": "Worst $$O(N^2)$$" }, "References": [ "Wikipedia" diff --git a/algorithm/backtracking/n_queens/desc.json b/algorithm/backtracking/n_queens/desc.json index 77c991ee..7cbd07b0 100644 --- a/algorithm/backtracking/n_queens/desc.json +++ b/algorithm/backtracking/n_queens/desc.json @@ -5,8 +5,8 @@ "Searching" ], "Complexity": { - "time": "Worst O(N!)", - "space": "Worst O(N)" + "time": "Worst $$O(N!)$$", + "space": "Worst $$O(N)$$" }, "References": [ "geeksforgeeks" diff --git a/algorithm/number_theory/sieve_of_eratosthenes/desc.json b/algorithm/number_theory/sieve_of_eratosthenes/desc.json index a684f3d7..951ae7d6 100644 --- a/algorithm/number_theory/sieve_of_eratosthenes/desc.json +++ b/algorithm/number_theory/sieve_of_eratosthenes/desc.json @@ -1,8 +1,8 @@ { "Sieve of Eratosthenes": "Finding all prime numbers up to a given range.", "Complexity": { - "time": "O(n(log n)(log log n))", - "space": "O(n1/2)" + "time": "$$O(n\\,(log\\,n)(log\\,log\\,n))$$", + "space": "$$O(n^{\\frac{1}{2}})$$" }, "References": [ "Wikipedia" diff --git a/index.html b/index.html index 86ed1f4f..a5bb36e9 100644 --- a/index.html +++ b/index.html @@ -11,6 +11,20 @@ Algorithm Visualizer + + @@ -36,7 +50,6 @@

Generate -
{ let category_name; let algorithm_name; - if (isScratchPaper(category)) { + if (utils.isScratchPaper(category)) { $menu = $('#scratch-paper'); category_name = 'Scratch Paper'; algorithm_name = algorithm ? 'Shared' : 'Temporary'; @@ -45,4 +41,5 @@ module.exports = (category, algorithm, data, requestedFile) => { showDescription(data); addFiles(category, algorithm, files, requestedFile); + utils.renderMathJax(); }; diff --git a/js/utils/index.js b/js/utils/index.js index ac608251..ffdbf5f1 100644 --- a/js/utils/index.js +++ b/js/utils/index.js @@ -14,8 +14,13 @@ const getFileDir = (category, algorithm, file) => { return `./algorithm/${category}/${algorithm}/${file}/`; }; +const renderMathJax = () =>{ + MathJax.Hub.Queue(["Typeset",MathJax.Hub]); +}; + module.exports = { isScratchPaper, getAlgorithmDir, - getFileDir -}; \ No newline at end of file + getFileDir, + renderMathJax +}; pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy