You are not logged in. Please login at 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, 18:17

the_extractor's gravatar image

accept rate: 8%

edited 10 Nov '18, 00:43

toggle preview

Follow this question

By Email:

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 08 Nov '18, 18:17

question was seen: 114 times

last updated: 10 Nov '18, 00:43