Explore diverse LeetCode solutions in Python, C++, JavaScript, SQL, and TypeScript. Ideal for interview prep, learning, and code practice in multiple programming languages. Github Repo Link
Given an array of meeting time intervals where intervals[i] = [start i , end i ], determine if a person could attend all meetings.
Example 1:
Input: intervals = [[0,30],[5,10],[15,20]] Output: false
Example 2:
Input: intervals = [[7,10],[2,4]] Output: true
Constraints:
0 <= intervals.length <= 10 4intervals[i].length == 20 <= start i < end i <= 10 6
Python
from typing import List class Solution: def canAttendMeetings(self, intervals: List[List[int]]) -> bool: if len(intervals) == 0: return True intervals.sort() for i in range(1, len (intervals)): if intervals[i][0] < intervals[i-1][1]: return False return True intervals = [[7, 10], [2, 4]] print(Solution().canAttendMeetings (intervals))

![[LeetCode] 0020. Valid Parentheses](https://hogantechs.com/wp-content/uploads/2025/03/19-1024x577.jpg)