Ayush7614 / Ayush7614/Daily-Coding-DS-ALGO-Practice

Count the pair with given target in O(n) approach

Open
#593 1 comment 0 reactions 1 assignee Assigned to @jahnvisrivastava100 View on GitHub
LGMSOC21 🟩 Level1
Dominant language
C++
Stars
323
Forks
472
PR merge metrics
No merged PRs in 30d

Description

# Aim

This is the most famous question of GFG count the pair with given target in O(n) time complexity .

# Details

If we go with the normal approach it would lead to O(n^2) time complexity so to avoid these we will go with O(n) approach using unordered_map .

### Programming language

- [ ] C
- [x] C++
- [ ] Java
- [ ] Python

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.