MCPcopy Create free account
hub / github.com/StudyRust/leetcode_rust / main

Function main

1472-design-browser-history.rs:44–56  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

42}
43
44fn main() {
45 let mut obj = BrowserHistory::new("leetcode.com".to_string());
46 obj.visit("google.com".to_string());
47 obj.visit("facebook.com".to_string());
48 obj.visit("youtube.com".to_string());
49 println!("{:?}", obj.back(1));
50 println!("{:?}", obj.back(1));
51 println!("{:?}", obj.forward(1));
52 obj.visit("linkedin.com".to_string());
53 println!("{:?}", obj.forward(2)); // linkedin
54 println!("{:?}", obj.back(2));
55 println!("{:?}", obj.back(7));
56}

Callers

nothing calls this directly

Calls 1

visitMethod · 0.80

Tested by

no test coverage detected