Do not provide accessible problem links, nor specify which company.
- Write a regular expression to determine whether the first and last letters of two strings are respectively the same, e.g., “aaa” and “aba” are considered matching.
- Given an array, find a subarray such that after sorting this subarray the whole array becomes sorted (the subarray length should be minimal).
- Evaluate ternary expressions that contain only positive integers, addition, subtraction, multiplication, division, and relational operators, with possible nested ternary expressions.
- The K‑th largest element in an array,
- LRU
- Given an array of length n where each element is in [1, n], find the numbers that appear twice (there may be more than one).
- Implement a calculator for addition, subtraction, multiplication, division with parentheses.
- Given coordinates of four points, each pair representing a line segment, determine whether the segments intersect.
9