Topic — Add New » Posts Last Poster Freshness
maximum size stack 2 1 year

you're given a set of 'n' rectangular boxes B(i), 1 <= i <= n. the three dimensions of box B(i) are x1(i), x2(i) & x3(i).

your aim is to create a stack (keeping a box on other box) of maximum height. you can keep a box B(i) on box B(j) only when the area of faces in contact (of boxes B(i) & B(j)) holds following property-

face_area_in_contact(B(i)) <= face_area_in_contact(B(j))

find a strategy to get maximum height stack. of course you can rotate the box ...

Stack is growing upwards or downwards? 4 1 year

To check whether processor stack is growing upwards or downwards !!!

Stak overflow again 2 1 year

Is there a way to check to increase the stack size if stack overflow occurs?

How to sort a stack without using external stack? 3 1 year

How to sort a stack without using external stack?

Microsoft Interview Question about Algorithms 1 hina 1 year

implement thread-safe version of stack[Microsoft]
implement synchronize access for a stack.You do not want to use locking to implement synchronization.Implement a thread-safe version of the stack.

Microsoft
[closed] Adobe Interview Question for Software Engineer/Developer about Data Structure 4 kartik 1 year

Design a datastructure to implement a stack such that ALL of push(), pop() and getMax() functions work in O(1) time. You have infinite memory at your disposal.
Also note that function getMax() just returns the element with maximum value in the stack and NOT delete it from the stack like what pop() does.

I tried normal stack, priority queue using HEAP and hash table, nothing seems to work.. Atleast one of the above functions becomes O(n) or O(log n).

Adobe
Variable number of integers 2 kartik 1 year

What do you mean by a stack or a queue in which each item is a variable number number of integers?
Is it a queue of a queue, queue of a stack etc

Amazon Interview Question for Software Engineer/Developer about Linked Lists 3 anuragvickey 1 year

Implement class Stack using a linked list

Amazon
[closed] Examine the pairs and orders of "{","}","(",")","[&quot 4 geeksforgeeks 2 years

Given a string, how to write a C++ program to examine whether the pairs and the orders of "{","}","(",")","[","]" are correct?

A data structure for text editor 2 2 years

Implement an ADT for a buffer in a text editor. It should support the following operations:
* insert(c): insert character c at cursor
* delete(): delete and return the character at the cursor
* left(): move the cursor one position to the left
* right(): move the cursor one position to the right
* get(i): return the ith character in the buffer

[closed] Implement queue using stacks 3 geeksforgeeks 2 years

How will implement queue using 2 stacks such that enqueue and dequeue operations are efficient