Company: Josh Technology_25july
Difficulty: medium
Maximum Workshops Problem Description A university is hosting several workshops during a festival. Each workshop is represented by a pair [start, end] , where start is the start time and end is the finish time ( start ). An attendee wants to join the maximum number of workshops without overlaps. If one workshop ends at the same time another begins, both can be attended. Overlapping workshops cannot both be attended. Write a function maxWorkshops that returns the maximum number of workshops that can be attended. Examples Example 1: Input: intervals = [[0,30],[5,10],[15,20]] Output: 3 Explanation: Skip the first workshop and attend the other three. Example 2: Input: intervals = [[5,8],[9,15]] Output: 2 Explanation: These workshops do not overlap, so both can be attended. Example 3: Input: intervals = [[1,3],[2,4],[3,5],[7,8],[8,12]] Output: 4 Explanation: Take the workshop (1,3), (3,5), (7,8) and (8,12). Constraints 0 0 0 const readline = require('readline'); const rl = readline.createIn