(This question is a variation of the LeetCode question 3161. Block Placement Queries. If you haven't completed that question yet, it is recommended to solve it first.)
You are given a list of operations on an infinite number line of non-negative integer positions. Each operation is one of two types:
[1, x]: Place an obstacle at positionx.[2, x, size]: Block check. Checks whether any obstacle exists in the range[x - size, x - 1](exactlysizeconsecutive positions). Appends"1"to the result if the range is clear, or"0"if at least one obstacle is present. Positionxitself is not included in the checked range. Block checks are read-only and do not modify the obstacle state.
Ask AI Assistant

Ask AI Assistant
Ask me anything about this coding question!
Test Cases
Input
Output
Expected