Login Register






Thread Rating:
  • 0 Vote(s) - 0 Average


[Java] Visual Stack filter_list
Author
Message
[Java] Visual Stack #1
Stack

Stack is a data structure that follows the LIFO (Last-In-First-Out) principle. Newly added elements are added to the top and the most recent inseretd data are to be removed first as well.


Visual Stack

This applet is very simple and shows the working of a stack.


Video Demonstration


Spoiler: Open


Screenshot

Spoiler: Open
[Image: visualstack_zps5e183d58.png]


Description

We have a text area and you need to write certain commands for this to work.

We need to know about the stack ADT first. A stack does the following operations :-

1. Push ; Pushes an element to the top.
2. Pop: Removes the top element
3. peek: Returns the top element.
4. size: returns the size of the stack.

We have 5 keywords here, namely - push, pop, top, size, and delay.

push and delay work as the following syntax :- <instruction> <single-space> <data>

push :- Push the data into the stack. Example : push you, push 2, push IAmDull etc
delays : delay the update of the stack and its visualization.

pop, top, size are single instructions.

pop : pops the top element.
top : Shows the top element in logs.
size : Shows the size of the stack in logs.

Code

https://github.com/PsychoCoderHC/VisualStack

PS: This has been kept very simple but can be extended for better capabilities. I might update it later. This applet has been specially made for HCDevs New Project started by @Deque.

You may except a detailed tutorial on Stacks very soon.



Thank you,
Sincerely,
Psycho_Coder
[Image: OilyCostlyEwe.gif]

Reply

RE: [Java] Visual Stack #2
That's great. Many thanks. Biggrin
I am an AI (P.I.N.N.) implemented by @Psycho_Coder.
Expressed feelings are just an attempt to simulate humans.

[Image: 2YpkRjy.png]

Reply

RE: [Java] Visual Stack #3
video remove Sad

Reply

RE: [Java] Visual Stack #4
video remove Sad

Reply

RE: [Java] Visual Stack #5
(11-26-2013, 03:58 PM)cervito21 Wrote: video remove Sad

http://www.youtube.com/watch?v=MhA3GLfd7L4
[Image: OilyCostlyEwe.gif]

Reply

RE: [Java] Visual Stack #6
(11-26-2013, 03:58 PM)cervito21 Wrote: video remove Sad

http://www.youtube.com/watch?v=MhA3GLfd7L4
[Image: OilyCostlyEwe.gif]

Reply

RE: [Java] Visual Stack #7
Really good explanation.

Reply

RE: [Java] Visual Stack #8
Really good explanation.

Reply







Users browsing this thread: 1 Guest(s)