For all the queries, my output shows max_value. I didnt get to know what was the fault
@vishruth Saw a similar question on Slack from you. Is this resolved?
Its not been resolved yet
Hey @vishruthshandilya I dont really have access to your code … have you made any submissions?
Hey @vishruth I went through your code. It seems like your implementation of the updateTree is wrong. According to your current logic, the
updateTree() replaces all the leaf nodes of the segment tree with a value
val. Correcting that should resolve your issue.
Closing this topic as your issue is resolved by the mentor. If it is still not resolved, Kindly un-mark the accepted solution or create a new topic and post this question as a reference link in the description of the new topic.