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

×

Need Help with the Time Complexity of a DP Solution

Problem: Brackets

I wrote a dynamic programming solution to the above problem but can't analyze its time complexity. Can someone please help?

In my code, $f(l, r)$ is the maximum sum that can be obtained in the range $[l, r]$.

EDIT: Can someone please confirm if it's $\mathcal{O}(n^3)$?

asked 08 Nov, 18:17

the_extractor's gravatar image

4★the_extractor
1047
accept rate: 7%

edited 10 Nov, 00:43

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:

×1,952
×78
×7
×5

question asked: 08 Nov, 18:17

question was seen: 88 times

last updated: 10 Nov, 00:43