Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/amos-kibet/data-structures
https://github.com/amos-kibet/data-structures
Last synced: 5 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/amos-kibet/data-structures
- Owner: amos-kibet
- Created: 2021-03-22T07:23:51.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-03-22T08:20:05.000Z (almost 4 years ago)
- Last Synced: 2024-12-07T10:07:06.706Z (2 months ago)
- Language: Java
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Data-Structures Blogpost on Decoded Africa
## Below is a description of the challenge:
* Given an array of integers that is already sorted in ascending order,
* find two numbers such that they add up to a specific target number
* (there is no guarantee that the 2 numbers exist) e.g.
* Input: numbers = [2,7,11,15], target = 9
* Output: [2,7] because 2 and 7 adds up to 9
* (we are supposed to return an array of size 2 containing the numbers).
* We can use a two-pointer approach as shown in the code above: