Last active
February 1, 2018 04:38
-
-
Save Mk-Etlinger/58beb072cea2b0c90dd51ef7fd7eee6c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Input: [ 2, 7, 11, 15 ] | |
//* Use a nested for loop | |
//* compare the current num(i) to the next num(k++) and check if they match | |
//* if they match then return both indices in an array | |
// Output: [ 0, 1 ] | |
// edge cases: ?? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment