Competitive Programming
3.81K subscribers
1 photo
38 links
Experince a new world of algorithmic problems using C++
Channel link:
https://t.me/Competitive_Programming_Cpp

For any query contact me:
@saranyanaharoy
You can also share your experiences and ideas with us. We will share it in our channel.
Download Telegram
Hello Everyone!!!
It is time to face some interesting problems.
Are you excited😄😄😄😄

Our 1st problem is from codechef


PROBLEM LINK:
ONE KING

DIFFICULTY:
EASY-MEDIUM

PROBLEM:
Given N (≤100000) intervals [Ai , Bi], one such interval can be deleted by placing a bomb at x if Ai ≤ x ≤ Bi. Find minimum number of bombs required to delete all intervals.




SOLUTION:
EXPLANATION
CODE:
code

NOTE: Above idea is implemented using C++. Some C++ template classes from STL(Standard Template Library) are used. (STL). Specifically vector and pair are used in the solution code.

vector
pair
sorting vector of pairs


#oneking #codechef