largest rectangle area in histogram

Revision en1, by vsanjay_nitdgp, 2015-09-04 07:05:19

hello sir/mam,

yesterday i started solving the following problem using stack..

https://www.hackerrank.com/challenges/largest-rectangle

this is my solution

http://ideone.com/SomZF4

i think my code is entirely correct,,,but dont know where it is going wrong.....answer has to be 9 for the sample input....but i am getting it as 5..

could any on pls say error in my code..

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English vsanjay_nitdgp 2015-09-04 07:05:19 422 Initial revision (published)