summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorPratik Karki <predatoramigo@gmail.com>2017-10-17 15:00:13 +0545
committerGitHub <noreply@github.com>2017-10-17 15:00:13 +0545
commitbd9021d4bc4e89ce2733b8823dd6ac24ed1626d1 (patch)
tree949c0ecdd4e0236507bcf16cc02e3eab89d09c42
parent76d91ae4fe8eee4250bdebef986584970aef6976 (diff)
parentc174cb0829e3b1e92c9cf86a8dc0c0f77b95295d (diff)
Merge pull request #2911 from ditam/dynamic-programming-markdown-escaping
[dynamic-programming/en] add backticks to escape markdown formatting characters
-rw-r--r--dynamic-programming.html.markdown2
1 files changed, 1 insertions, 1 deletions
diff --git a/dynamic-programming.html.markdown b/dynamic-programming.html.markdown
index 7df367e7..4db8e92e 100644
--- a/dynamic-programming.html.markdown
+++ b/dynamic-programming.html.markdown
@@ -26,7 +26,7 @@ The Longest Increasing Subsequence problem is to find the longest increasing sub
First of all we have to find the value of the longest subsequences(LSi) at every index i with last element of sequence being ai. Then largest LSi would be the longest subsequence in the given sequence. To begin LSi is assigned to be one since ai is element of the sequence(Last element). Then for all `j` such that `j<i` and `aj<ai`, we find Largest LSj and add it to LSi. Then algorithm take *O(n2)* time.
Pseudo-code for finding the length of the longest increasing subsequence:
-This algorithms complexity could be reduced by using better data structure rather than array. Storing predecessor array and variable like largest_sequences_so_far and its index would save a lot time.
+This algorithms complexity could be reduced by using better data structure rather than array. Storing predecessor array and variable like `largest_sequences_so_far` and its index would save a lot time.
Similar concept could be applied in finding longest path in Directed acyclic graph.