77
1
using System;
2
using System.Collections.Generic;
3
4
public interface Iterator
5
{
6
string Current();
7
bool HasNext();
8
void Next();
9
}
10
11
public class BrowserHistory
12
{
13
private string[] urls = new string[10];
14
private int count = 0;
15
16
public void Push(string url)
17
{
18
urls[count] = url;
19
count++;
20
}
21
22
public string Pop()
23
{
24
count--;
Cached Result
Grok AI Generated Code for GetInnermostString function