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

Function main

206-reverse-linked-list.rs:38–64  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

36}
37
38fn main() {
39 let n5 = Box::new(ListNode {
40 val: 5,
41 next: None
42 });
43 let n4 = Box::new(ListNode {
44 val: 4,
45 next: Some(n5)
46 });
47 let n3 = Box::new(ListNode {
48 val: 3,
49 next: Some(n4)
50 });
51 let n2 = Box::new(ListNode {
52 val: 2,
53 next: Some(n3)
54 });
55 let n1 = Box::new(ListNode {
56 val: 1,
57 next: Some(n2)
58 });
59 let list1 = Box::new(ListNode {
60 val: 0,
61 next: Some(n1)
62 });
63 println!("{:?}", reverse_list(Some(list1)));
64}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected