A Discrete Mathematics professor has a class of students. Frustrated with their lack of discipline, the professor decides to cancel class if fewer than some number of students are present when class starts.
Arrival times go for on time (arrivalTime less than or equal to zero) to Arrived late( arrivalTime greater than zero)
Example:
n=5
k=3
arr=[-2,-1,0,1,2]
The first 3 students arrive on. The last 2 students were late. The threshold is 3 students, so class will go on. Return YES.
Problem Link:
https://www.hackerrank.com/challenges/angry-professor/problem
Download
0 formats
No download links available.
Angry Professor - Hackerrank Solution in Java | Zoho Coding Question in Hackerrank Tamil | NatokHD