Javascript solution, if anyone is interested


  • 1
    P
    var canAttendMeetings = function(intervals) {
        intervals.sort(function(a, b) {
            return a.start - b.start
        })
        for (var i = 0; i < intervals.length - 1; i++) {
            if (intervals[i].end > intervals[i + 1].start) {
                return false;
            }
        }
        return true;
    };

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.