feat: Added Minimum Edit Distance Algorithm#1472
feat: Added Minimum Edit Distance Algorithm#1472ayaankhan98 merged 21 commits intoTheAlgorithms:masterfrom
Conversation
Panquesito7
left a comment
There was a problem hiding this comment.
Code is not up to the repository standards.
Please read them carefully and follow them.
Hi, Please check now. I have added the required changes. Hope this is now according to the guidelines. |
Panquesito7
left a comment
There was a problem hiding this comment.
You can see the typical structure of a program to see how to make your program as per the repository standards. 🙂
Yeah I have updated the code and included all the structures that are defined on the guidelines. Separate namepsace section, a test section. I have have also studied other codes of the repo and they are also like this. |
Panquesito7
left a comment
There was a problem hiding this comment.
Please rename the file to minimum_edit_distance.cpp.
Ok. But actually I had changed that. Don't know why does it still the same after the second commit and I will add extra documentation and let you know thanks. |
Panquesito7
left a comment
There was a problem hiding this comment.
👍 Good work.
Please enable GitHub Actions in your repository of this fork in this link: https://github.com/Nirzak/C-Plus-Plus/actions
Yeah I enabled it |
Panquesito7
left a comment
There was a problem hiding this comment.
Please fix clang-tidy warnings.
Don't know why does it showing return non-zero exit status but I have clearly defined return value 0 and the code is returning exit status 0 on my end. |
Code is just fine I have just checked the code in my PC with clang-tidy. I think -std=c++11 is causing the error. But I don't know why. The code works fine on my PC even when I used c++11 compiler. But from clang-tidy when I choose -std=c++14 instead of c++11 the errors were gone. |
clang-tidy suggested moving all if-else statements under braces. So, I did it.
Using of arrays changed to vectors as clang-tidy suggested to use vector instead of arrays.
|
@Panquesito7 Oh! It's because I used arrays for the Dynamic approach. Now when I have used vector instead of arrays, the Code Formatter check has been passed! Haha. |
Co-authored-by: David Leal <[email protected]>
|
Sir , just read the algorithm section of the code. Here I have clearly mentioned about the Insert, replace and delete operations. then I have also commented them on the dp function section then I have also specified them on the min function section. (inside the function above the function). What else can I do tell me. If someone here going learn something from this code he/she should catch up with those information. You know here you have to do a minimum effort. One can not fully insert an algorithm to your mind. You have your own effort then you can grab them. We can just do as much as help we can.
|
|
Here for an example an algorithm from your repository https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/coin_change.cpp it doesn't have any algorithm explanation at all but it got accepted. But I have explained the algorithm. Then explained all the function with comments. Still you are suggesting some changes without reading the whole code without reading the concepts. If it goes like that then it will take forever to get accepted because in this world nothing is 100% perfect and you are searching that 100% perfectness in my code only. |
|
Some codes out there are not documented. But, have you read the contributing guidelines? I don't wanna debate or discuss with you here publicly. The contributing guidelines clearly states that you should document your code. |
Yeah but the guideline also said that do not comment things that are obvious. So do I need to even document e return 0?Ok I will do it then and I apologize for above comments for being furious about some changes. I will comment every inch of line of the code tomorrow hope it will then accept. Good night. |
|
See https://thealgorithms.github.io/C-Plus-Plus and check out the documentation. Your code's documentation is required for Doxygen to make it like in the cloud for other users to see it. Offtopic: Also, please be respectful, and try not to be rude. Thank you for reading. |
Ok sir I understand. And yes That's why I have included cassert and test function and assert functions according to the guidelines. |
|
Adding test functions will not add the documentation automatically to the cloud. You need to write it manually, as I have told you previously. 🙂 |
Yeah that's what I am doing. Do I have to implement external function or use such to include them automatically or just writing them as previously does just fine. |
|
Hi, Please check now. I hope now at least the documentation will be ok. |
Co-authored-by: David Leal <[email protected]>
Co-authored-by: David Leal <[email protected]>
05b80c7 to
ca12b0c
Compare
Co-authored-by: David Leal <[email protected]>
Panquesito7
left a comment
There was a problem hiding this comment.
Amazing work; I like how you've made & improved the code so well. 😄 🎉
Code and documentation are pretty good and refined; LGTM. 👍
Thanks brother for the proper guidance. |
Description of Change
Checklist
Notes: