diff --git a/algorithm/category.json b/algorithm/category.json index f0e3dbf9..991133b4 100644 --- a/algorithm/category.json +++ b/algorithm/category.json @@ -20,6 +20,7 @@ "knapsack_problem": "Knapsack Problem", "longest_common_subsequence": "Longest Common Subsequence", "longest_increasing_subsequence": "Longest Increasing Subsequence", + "longest_palindromic_subsequence": "Longest Palindromic Subsequence", "max_subarray": "Maximum Subarray", "max_sum_path": "Maximum Sum Path", "pascal_triangle": "Pascal's Triangle", @@ -57,8 +58,8 @@ }, "number_theory": { "list": { - "euclidean_algorithm": "Euclidean Algorithm", - "sieve_of_eratosthenes": "Sieve of Eratosthenes" + "euclidean_algorithm": "Euclidean Algorithm", + "sieve_of_eratosthenes": "Sieve of Eratosthenes" }, "name": "Number Theory" }, diff --git a/algorithm/dp/longest_palindromic_subsequence/basic/code.js b/algorithm/dp/longest_palindromic_subsequence/basic/code.js new file mode 100644 index 00000000..5a066e4f --- /dev/null +++ b/algorithm/dp/longest_palindromic_subsequence/basic/code.js @@ -0,0 +1,60 @@ +function max(a,b) { + if(a>b){ + return a; + } else { + return b; + } +} +logger._print("LPS for any string with length = 1 is 1"); +for(i=2;i<=N;i++) { + logger._print("--------------------------------------------------"); + logger._print("Considering a sub-string of length "+i); + logger._print("--------------------------------------------------"); + for(j=0;j2)", + "space": "O(n2)" + }, + "References": [ + "GeeksForGeeks" + ], + "files": { + "basic": "Longest Palindromic Subsequence" + } +} diff --git a/gulpfile.babel.js b/gulpfile.babel.js index da390bde..1e528a2f 100644 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js @@ -1,3 +1,4 @@ + 'use strict'; import path from "path"; 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