Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code from 28_10_2021 #57

Open
NikolayLazarov opened this issue Oct 28, 2021 · 0 comments
Open

Code from 28_10_2021 #57

NikolayLazarov opened this issue Oct 28, 2021 · 0 comments

Comments

@NikolayLazarov
Copy link
Contributor

def check_arr(arr, result = 5):

arr.sort()
#[-50, -4, 1, 2, 4, 5, 5, 9, 23, 23, 40, 42]    
for i in arr:
    #-50 + x = 5
    #x = 5 - (-50)
    #binary search for x

return 

arr = [1 ,2 , 9 , 4 ,5 ,5, -50, 40, -4, 42 ,23 ,2 3]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant