File tree 2 files changed +4
-4
lines changed
src/main/java/com/thealgorithms/stacks 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 12
12
* Problem: https://www.baeldung.com/cs/stack-constant-time
13
13
*/
14
14
public class GreatestElementConstantTime {
15
- private Stack <Integer > mainStack ;
16
- private Stack <Integer > maxStack ;
15
+ private Stack <Integer > mainStack ; // initialize a mainStack
16
+ private Stack <Integer > maxStack ; // initialize a maxStack
17
17
18
18
/**
19
19
* Constructs two empty stacks
Original file line number Diff line number Diff line change 12
12
* Problem: https://www.baeldung.com/cs/stack-constant-time
13
13
*/
14
14
public class SmallestElementConstantTime {
15
- private Stack <Integer > mainStack ;
16
- private Stack <Integer > minStack ;
15
+ private Stack <Integer > mainStack ; // initialize a mainStack
16
+ private Stack <Integer > minStack ; // initialize a minStack
17
17
18
18
/**
19
19
* Constructs two empty stacks
You can’t perform that action at this time.
0 commit comments