You are not logged in. Please login at www.codechef.com to post your questions!

×

Explain the public section

Please explain the public section of the solution.

asked 27 Nov, 19:35

gautamcse27's gravatar image

3★gautamcse27
363
accept rate: 0%


Read this with patience. It's a great editorial for someone who wants to learn segment trees. The public section of the solution which you mentioned mainly performs two functions - Updates the segment tree (see the private section below for the working of the function change()), and queries the segment tree between l and r. I suggest you to read the editorial carefully and follow the steps, which will makes things clear.

List of problems using segment tree of easy and medium difficulty along with some great resources to learn can be found here.

link

answered 06 Dec, 01:34

ashutosh450's gravatar image

5★ashutosh450
46117
accept rate: 33%

toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×299

question asked: 27 Nov, 19:35

question was seen: 165 times

last updated: 06 Dec, 01:34