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

Method pop

232-implement-queue-using-stacks.rs:17–21  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

15 }
16
17 fn pop(&mut self) -> i32 {
18 let ret = self.v[0];
19 self.v.remove(0);
20 ret
21 }
22
23 fn peek(&self) -> i32 {
24 self.v[0]

Callers 1

mainFunction · 0.45

Calls 1

removeMethod · 0.45

Tested by

no test coverage detected