There are $2$ types of queries.
$1.$ Update values from $l$ to $r$ to $v$.
$2.$ Retrieve the value at index $k$.
For queries of type $2$ , I need to output the values.
$1 \le $ Queries $ \le 10^5$
How to solve this problem efficiently?
There are $2$ types of queries.
$1.$ Update values from $l$ to $r$ to $v$.
$2.$ Retrieve the value at index $k$.
For queries of type $2$ , I need to output the values.
$1 \le $ Queries $ \le 10^5$
How to solve this problem efficiently?