top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Java: How to simulate K Stacks in a single array (We can use only arrays if additional data structures are required)?

+2 votes
314 views
Java: How to simulate K Stacks in a single array (We can use only arrays if additional data structures are required)?
posted Apr 21, 2015 by anonymous

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
+6 votes

I was trying to get maximum rectangle area for a given histogram but I used brute force approach which have O(n^2) time complexity so I want some better solution using stack so that we could reduce time complexity to O(n) or O(log n ).

...