Add SecondMinMax - #4432
Conversation
vil02
left a comment
There was a problem hiding this comment.
@BharathSanjeeviT thanks for an interesting contribution. Before we will marge it, I have some remarks.
Please add some proper tests. Good examples to look at:
FactorialandFactorialTest,FindMaxandFindMaxTest.
|
Hey @vil02 , Thank you for looking into my contribution and suggesting all the changes. Hope I did correct all those you said 👍 |
BharathSanjeeviT
left a comment
There was a problem hiding this comment.
Hope I did solved all the change that you have addressed 👍
vil02
left a comment
There was a problem hiding this comment.
The logic in findSecondMin and findSecondMax is very similar (basically the type of inequality). Do you see some way to remove duplicated code?
By the way, you can commit suggestions directly just by clicking the Commit suggestion button - this automatically resolves the conversation.
|
Hey @vil02 , made the changes that you have mentioned and btw i thought Commit Changes would add extra commits, thanks for the information 👍 |
BharathSanjeeviT
left a comment
There was a problem hiding this comment.
Made all these changes 👍
vil02
left a comment
There was a problem hiding this comment.
Sorry for a monster suggestion: sometimes it is easier to express ideas just by writing code.
c0521c4 to
ebe3c02
Compare
|
Hey @vil02 , made the changes that you've suggested 👍 |
The changes you say, actually making me to learn new things, so i should thank you 👍 |
a7ee1d2 to
07d23aa
Compare
|
Hey @vil02 , the changes you have suggested are made, hope you merge this PR 👍 |
Each variable declaration must be in its own statement.
SecondMinMax
|
@BharathSanjeeviT thanks for your contribution! |
|
Hey @vil02 , Thank you soo much, i loved this process of contributing towards The Algorithms 👍 |
Description
This PR provides a feature that contains the Java Program to find second largest / smallest element from the array with the most optimal solution
This PR addresses the Issue #4430
I have read code of conduct and provided this PR accordingly