Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Choose your form and fill it -
1. Form 1(C++ Solution contributors)
1) Form 1
Issue Id you have worked upon -
Given a target element, need to find the sum of exactly three numbers from an array which should be around or equal to that target element.
Briefly explain your program logic -
Sort the array provided, then using two pointer approach need to calculate the sum of (currentIndex) + (currentIndex+1) + (RightIndex) and find the absolute difference and keep track of a variable "closest" which will be updated if the resultant value is lower than existing closest value.
Screenshots(Attach 2 screenshots of your own input and output) -
Checklist:
Eg - If your code follow the below guidelines. Kindly change [] to [x]
All the conditions should be fulfilled for considering your code for merging -
I have mentioned the question as comment in my solution file.
My code follows the guidelines of this project.
I have performed a self-review of my own code.
I have commented my code.
My code gives the correct output.
I confirm that I have not copied the code from anywhere. In case its found that I have copied even after successful merge then I can be banned from the repository and hacktoberfest.
I affirm that I strictly follow contributing guidelines and code of conduct.