DEV Community

loading...

Discussion on: Daily Coding Problem #1

Collapse
keithlogan94 profile image
Keith

Best way for 1 pass would be to as you iterate through the array, store the number pair that would make that index total k into an array. And then on each subsequent number check it it exists in the check array before storing its pair