You are given two independent coding tasks.
Task 1: Minimum number of meeting rooms
Given a list of meeting time intervals intervals, where each interval is [start, end) with integer times and start < end, compute the minimum number of conference rooms required so that no meetings assigned to the same room overlap.
-
Two meetings do
not
overlap if one ends at the exact time the other starts (because intervals are half-open
[start, end)
).
Input: intervals: List[List[int]]
Output: int (minimum number of rooms)
Constraints (typical):
-
0 <= intervals.length <= 10^5
-
0 <= start < end <= 10^9
Task 2: Evaluate an expression in Reverse Polish Notation
Given an array of strings tokens representing an arithmetic expression in Reverse Polish Notation (postfix form), evaluate the expression and return the result as an integer.
-
Valid operators are
"+"
,
"-"
,
"*"
,
"/"
.
-
Each operand is an integer string (may be negative).
-
Division should truncate toward zero.
-
The input expression is guaranteed to be valid.
Input: tokens: List[str]
Output: int
Constraints (typical):
-
1 <= tokens.length <= 10^4
-
Operands fit in 32-bit signed integer range; intermediate results fit in 32-bit signed integer range.