2023-07-01 11:58:00 -04:00
|
|
|
public program()
|
|
|
|
|
{
|
|
|
|
|
var stack := new system'collections'Stack();
|
|
|
|
|
|
2024-03-06 22:25:12 -08:00
|
|
|
stack.push(2);
|
2023-07-01 11:58:00 -04:00
|
|
|
|
|
|
|
|
var isEmpty := stack.Length == 0;
|
|
|
|
|
|
|
|
|
|
var item := stack.peek(); // Peek without Popping.
|
|
|
|
|
|
|
|
|
|
item := stack.pop()
|
|
|
|
|
}
|