approach's blog

By approach, history, 9 months ago, In English

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 !!

Read more »

 
 
 
 
  • Vote: I like it
  • +1
  • Vote: I do not like it