#C2826. Sorted Employees by Experience Range
Sorted Employees by Experience Range
Sorted Employees by Experience Range
Given a list of employees with their details, your task is to filter out and sort the names of those employees whose years of experience fall within a given inclusive range. Each employee is represented by four values: $$EmployeeID$$, $$Department$$, $$Name$$, and $$Experience$$. You will be provided with an integer $$n$$ indicating the number of employees, followed by $$n$$ lines of employee data, and finally two integers $$minExperience$$ and $$maxExperience$$. Your output should be the sorted names (in lexicographical order) of the employees whose experience satisfies $$minExperience \leq Experience \leq maxExperience$$. If no employee qualifies, output an empty line.
inputFormat
Input is read from standard input. The first line contains an integer $$n$$ representing the number of employees. Each of the next $$n$$ lines contains four values: an integer EmployeeID, an integer Department, a string Name (without spaces), and an integer Experience. The last line contains two space-separated integers: $$minExperience$$ and $$maxExperience$$.
outputFormat
Output a single line to standard output containing the names of employees whose experience is within the inclusive range [$$minExperience, maxExperience$$]. The names must be sorted in lexicographical order and separated by a single space. If no employees match the criteria, output an empty line.## sample
4
1 101 Alice 5
2 102 Bob 10
3 101 Charlie 7
4 103 David 3
4 8
Alice Charlie