Skip to content

Instantly share code, notes, and snippets.

@Mk-Etlinger
Last active February 1, 2018 04:38
Show Gist options
  • Save Mk-Etlinger/58beb072cea2b0c90dd51ef7fd7eee6c to your computer and use it in GitHub Desktop.
Save Mk-Etlinger/58beb072cea2b0c90dd51ef7fd7eee6c to your computer and use it in GitHub Desktop.
// 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