• 5 days ago
Transcript
00:00Now we will implement a stack with Java Collection Frameworks.
00:03Java Collection Frameworks is a divine type of thing in Java,
00:08which is very simple and very easy.
00:12If we implement this code in Java Collection Framework,
00:16we will import all our Java.util.classes.
00:21This statement is very important.
00:24Now we will remove all the stack from here.
00:27There will be a single line change in the main function.
00:31And the single line will be the stack.
00:35What we will do here?
00:37We will write this line.
00:38We will write stack of integers.
00:42Which will be named S.
00:45We will create new stack.
00:47We will change the single line.
00:50We will create our stack.
00:52J, C, F.
00:54We will push the same operation.
00:58In Java Collection Framework is empty,
01:01peak and pop.
01:03Now we will save this code.
01:05We will run this code and see our output.
01:08In the output we have 3, 2, 1.
01:10Which is the same output.
01:12Whether we have ArrayList or LinkList.
01:14But this is the easiest implementation when we implement the stack.
01:18So, if we implement the stack.
01:19If we implement the placement,
01:21or we implement the interviews,
01:23or for coding tests,
01:25or for online contests,
01:27we implement the stack.
01:29So, when we get deep core implementation,
01:31we can implement the stack in short.
01:34In Java Collection Framework.
01:36So, this is the same way.
01:37So, we will implement it in short.
01:38We will implement it in short.
01:38So, we will implement it in short.
01:39So, we will solve questions.
01:40I'll get right back.
01:40I'll see you next time.