Help needed in range based query problem.

Revision en1, by approach, 2020-12-30 01:49:40

I know how to increase values in an array from 'L' to 'R' by a constant no.

  • first value by 1
  • second value by 1
  • third value by 1

but unable to figure out how to increment value like ..

  • first value by 1
  • second value by 2
  • third value by 3 and so.....

Problem was :: Angry Cyborg

I tried few approaches like decreasing R + 1th element by R — L + 1 and so but they didn't seem to work.

I am stuck in this question, can u please provide any hint. You have my thanks !!

Tags #help, #helping

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English approach 2020-12-30 01:49:40 607 Initial revision (published)