You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.
In a sorted list of int find two elements with sum of target.
Return these elements within a new list or an empty list in case it's impossible to obtain the target value.
Optional:
return elements with sum which is the most close to the target.
The text was updated successfully, but these errors were encountered:
The overall development process is described in comments to #87.
Let me know in case you need help, I'll do my best to provide it.
Solution
To tell you the truth, I did not think about the implementation for this issue.
I believe the best way is to use the sorted nature of the input list. So, bisearch package is the good place to start the work.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
assignmentRepresents a challenge for homework or exam
In a sorted list of
int
find two elements with sum oftarget
.Return these elements within a new list or an empty list in case it's impossible to obtain the
target
value.Optional:
return elements with sum which is the most close to the
target
.The text was updated successfully, but these errors were encountered: