Skip to content
Programmingoneonone
Programmingoneonone
  • Engineering Subjects
    • Internet of Things (IoT)
    • Digital Communication
    • Human Values
  • Programming Tutorials
    • C Programming
    • Data structures and Algorithms
    • 100+ Java Programs
    • 100+ C Programs
    • 100+ C++ Programs
  • Solutions
    • HackerRank
      • Algorithms Solutions
      • C solutions
      • C++ solutions
      • Java solutions
      • Python solutions
    • Leetcode Solutions
    • HackerEarth Solutions
  • Work with US
Programmingoneonone
Programmingoneonone

HackerEarth Little Kuldeep and contests problem solution

YASH PAL, 31 July 202413 February 2026
In this HackerEarth Little Kuldeep and contests problem solution Everyone who is involved with HackerEarth in whatsoever form knows who Little Kuldeep is. He’s not so little, but he’s called that. (No one knows why!) He’s pretty efficient at organizing, mentoring, managing various hiring challenges, contests happening on HackerEarth all the time. But age has caught up with him, finally. He’s turned into little, old Kuldeep from little Kuldeep.
 
Earlier, he could’ve handled multiple contests like a piece of cake, but it is not possible for him now. In the present scenario, he needs other people to moderate contests, because he’s busy moderating some other contest that is happening at the same time.
 
Given the timings of the contests happening, can you check and tell little, old Kuldeep if he would need a moderator to help him out, or not?
 
 
HackerEarth Little Kuldeep and contests problem solution

 

 

HackerEarth Little Kuldeep and contests problem solution.

#include<bits/stdc++.h>

#define int long long int
#define pb push_back
#define f first
#define s second
#define all(x) x.begin() , x.end()
#define forn(n) for(int i=0;i<n;i++)
#define fork(k, n) for(int i=k;i<n;i++)
#define fast ios_base::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL)
#define endl "n"
#define mod 1000000007

using namespace std;

struct Interval {
int start;
int end;
};

bool cmp(Interval a,Interval b)
{
if(a.start < b.start)
return true;
return false;
}

void solve() {
int n;
cin>>n;
Interval arr[n];
string s;
int start,end;
forn(n)
{
cin>>s;
start = stoi(s.substr(0,2))*60 + stoi(s.substr(3,2));
end = stoi(s.substr(6,2))*60 + stoi(s.substr(9,2));
arr[i] = { start , end };
}
sort(arr,arr+n,cmp);
//forn(n) cout<<arr[i].start<<" "<<arr[i].end<<" n";
bool ok = true;
forn(n-1)
{
if(arr[i].end > arr[i+1].start )
{
ok = false;
break;
}
}
if(ok)
cout<<"Who needs a moderator?";
else
cout<<"Will need a moderator!";
return ;
}

signed main() {
fast;
int t = 1;
//cin >> t;
while (t--) {
solve();
}
return 0;
}
 
coding problems solutions HackerEarth HackerEarth

Post navigation

Previous post
Next post

Leave a Reply

Your email address will not be published. Required fields are marked *

Programmingoneonone

We at Programmingoneonone, also known as Programming101 is a learning hub of programming and other related stuff. We provide free learning tutorials/articles related to programming and other technical stuff to people who are eager to learn about it.

Pages

  • About US
  • Contact US
  • Privacy Policy

Practice

  • Java
  • C++
  • C

Follow US

  • YouTube
  • LinkedIn
  • Facebook
  • Pinterest
  • Instagram
©2026 Programmingoneonone | WordPress Theme by SuperbThemes