Closed ghost closed 5 years ago
Are you talking about subsequence
or substring
?
@Just-A-Visitor can you further explain it please? It says subsequence (using LCS)
in the title and I can work on either one but your LCS solution is just for strings if I'm not mistaken.
You've already worked on Longest Common Substring. Make a new issue and a new pull request for that.
This question pertains to finding the longest common subsequence using the existing code of LCS.
Yes, I've already written the code for LCS of 2 strings. But that code is equally valid for an array. Hence, you can assume that the user knows about LCS and then write the code. (Note that the code is only 3 to 4 lines long if you assume this, hence it was labeled as a beginner. Hence, you can reconsider your decision. However, please discuss the code/logic before writing the pseudocode).
Please do not write LCS again
Please wait for the review of your pull request for Longest Common Substring before writing the pseudocode. (This is to ensure that you get familiar with the coding standards).
This question is specific to strings, hence you need not worry about the code of LCS. Just copy paste it as it is.
@yildirimyigit Please test your approach here before moving on to the pseudocode.
You can either use the LCS approach (Hint: Reverse the string). if you are confused, just implement simple DP (Bottom Up or Top Down) and I'll add the solution using LCS later. Maybe this would be better to work on for you!
I have already had the LCS approach. I am trying to figure out the conventions you use, at the moment.
But make a pull request for your previous code first so that I can review it.
Remember to place it inside Pseudocode/Dynamic Programming/Longest Common Substring/SourceCode.tex
Don't put anything else for now (Not even ReadMe)
I cannot follow you mate. So sorry. To my understanding, you first want me to send you the source code, like the cpp file so that you can chek it against your standards. Only after you make sure that it complies with your standards, then you want me to write the document, SourceCode.tex
. Isn't it correct?
So where am I supposed to place the cpp file?
No. I want you to send me the SourceCode.tex
file via PR (exactly as you did earlier). But this time, make the name of the folder as Longest Common Substring. (Just send your old source code (Latex) as it is).
Your previous PR was correct (just in the wrong folder). I want you to file that PR again.
Place it inside Pseudocode/Dynamic Programming/Longest Common Substring/SourceCode.tex
Don't put anything else for now (Not even ReadMe)
And no, I'm not asking for the source code (CPP), you just have to send the LaTex file. I was talking about the coding standards of LaTex and not CPP. If you're confused, don't worry, just file a PR and I'll suggest changes to your Latex file to show you the conventions I use.
Using the Code Review feature of Github, I can suggest changes in your pseudocode file. This way you can easily pick up the conventions.
Ok. One last thing. The one I sent you earlier was Longest Palindromic Substring not Longest Common Subsequence. So you want the palindromic substring, right?
Yes, exactly.
You are one patient guy :smile:
Then again, the title of this issue is "Longest Palindromic Subsequence" and my PR is for Longest Palindromic Substring. We should have opened another issue for that, I guess.
My next PRs won't require this much energy of yours, I promise.
Oh, Don't worry about the title. I'll sort it out. Give me 5 minutes and I'll be done with the review. Then we can merge it.
I've left some comments in your PR. Please go through them.
Hey, I would like to write the pseudocode for the longest palindromic subsequence (using LCS)
problem too. Should I re-fork the project?
No need to fork it again. Just confirm that it shows This branch is even with Just-A-Visitor : Master
You can delete the temporary branch that you would've created. But no need to delete the fork. And make sure that you create a separate branch for each question(as you did right now)
If you create a new branch for each question, you'll have the flexibility to delete the branch (without going through the hassles of deleting your fork) if something goes wrong.
An important point, if the main page shows that your fork is x
commits behind my master
, just click the pull request option and it will be synced.
Hey @Just-A-Visitor,
I just wanted to let you know that I created another PR, https://github.com/Just-A-Visitor/Algorithmic-Pseudocode/pull/36 and added the link to the source code for lp_subsequence problem.
Hello, I intend to work on this one. Is it OK?