0
How to add arrays two digits
A array has [1,2,3,4,5,6,7]and we have to add two numbers in array if the results will be 8 soo print yes otherwise no by javascript
14 Respostas
+ 4
Please make your question clear.
And also dont forget to attach a code bit which shows u have attempted this.
+ 3
Here you go
https://code.sololearn.com/WCpfK0ilsp4d/?ref=app
+ 2
I saw your level in js. You have to keep learning.
You have reached the half way.
I am saying THIS because the solution is very advanced. Because you will have to work with loops and multiple iterations.
+ 2
Ok then,
+ 1
Do you want to know which two numbers in an array will sum 8
please be patient it takes time.
+ 1
Ok
+ 1
Thanks a lot sir
+ 1
I understand that very clearly
+ 1
If you only need to find one pair instead of many possibilities, but in rather quick way, you might consider two-pointer approach.
https://towardsdatascience.com/two-pointer-technique-solving-array-problems-at-light-speed-56a77ee83d16
0
I want to say that there is a array like [1,2,3,4,5,6,7,8] what we have to be for add two numbers like [7+1] soo if the results is ===8 soo code return me yes otherwise no how to Code it but we have to Code it by javascript
0
What means ok sir please tell me how to Code it
0
Yes sir
0
And how to Code it in javascript
0
Sir you only tell me the code I will understand