Questions related to data structures like "What data structure would you use for a browser's BACK & FORWARD ability"
Respostas da entrevista
Sigiloso
18 de jan. de 2013
I would use doubly link list
12
Sigiloso
4 de abr. de 2013
Use two stacks. Every time you visit a site, push its address in stack1. When you press back, pop from stack1 and also push in stack2. When user presses forward, pop from stack2 and also push in stack1.
3
Sigiloso
2 de out. de 2011
May be Stack , any one please correct me if I am wrong.
1
Sigiloso
26 de mai. de 2012
This can be implemented by using two different stacks, one for back and one for forward.
Sigiloso
24 de jan. de 2013
Doubly linkedList
1
Sigiloso
18 de ago. de 2019
two stacks.
When you visit a site, push its address into stack1 and clear stack2;
When you press back, pop the address from stack1 and push the same address into stack2;
When you press forward, pop the address from stack2 and push the same address into stack1.