parameters: (node, start, end, l, r)
return_statement: return ans
docstring: Input
          node: Current node of tree
         start: Starting index of input array
           end: Last index of input array 
        [l..r]: In this range you want to find minimum 
  
        Return: Minimum value between range [l..r]
docstring_summary: Input
          node: Current node of tree
         start: Starting index of input array
           end: Last index of input array 
        [l..r]: In this range you want to find minimum
docstring_tokens: Input node : Current node of tree start : Starting index of input array end : Last index of input array [ l .. r ] : In this range you want to find minimum
function: def query(node, start, end, l, r):
      
      '''Input
          node: Current node of tree
         start: Starting index of input array
           end: Last index of input array 
        [l..r]: In this range you want to find minimum 
  
        Return: Minimum value between range [l..r]
      '''
      
      # If the query is our of range of Segment Tree
      if start > end or start > r or end < l:
          return INF
      
      # Update current tree node
      if lazy[node] != 0:
          tree[node] += lazy[node]
          
          # Mark childs as lazy
          if start != end:
               lazy[node*2] += lazy[node]
               lazy[node*2+1] += lazy[node]
  
          # Reset current node
          lazy[node] = 0
  
      if start >= l and end <= r:
          return tree[node]
      
      # Find minimum element in left child tree
      min1 = query(node*2, start, (start+end)//2, l, r)
      # Find minimum element in right child tree
      min2 = query(node*2+1, (start+end)//2+1, end, l, r)
      # Combine ans
      ans =min(min1, min2)
      return ans
function_tokens: def query ( node , start , end , l , r ) : # If the query is our of range of Segment Tree if start > end or start > r or end < l : return INF # Update current tree node if lazy [ node ] != 0 : tree [ node ] += lazy [ node ] # Mark childs as lazy if start != end : lazy [ node * 2 ] += lazy [ node ] lazy [ node * 2 + 1 ] += lazy [ node ] # Reset current node lazy [ node ] = 0 if start >= l and end <= r : return tree [ node ] # Find minimum element in left child tree min1 = query ( node * 2 , start , ( start + end ) // 2 , l , r ) # Find minimum element in right child tree min2 = query ( node * 2 + 1 , ( start + end ) // 2 + 1 , end , l , r ) # Combine ans ans = min ( min1 , min2 ) return ans