Min Query-I using Segment Trees

I used a basic segment tree approach. There are two types of queries, point update and get Minimum. I am getting wrong answer in 2 out 3 test cases. Can you take a look why that is happening.

Question:
https://online.codingblocks.com/app/player/65729/content/154708/4859/code-challenge

My Solution:

@Abhishek.1514,
Updated code Link.

The updated code gets TLE in all cases. We are visiting every node. This reduces the benifit of a segment tree. Why will we do this?

@Abhishek.1514,
I am sorry, I mistakenly commented the No overlap condition. You can submit after uncommenting it.