MCPcopy Create free account
hub / github.com/douchuan/algorithm / create_ll

Function create_ll

tests/test_linked_list.rs:111–120  ·  view source on GitHub ↗
(data: &[T])

Source from the content-addressed store, hash-verified

109}
110
111fn create_ll<T>(data: &[T]) -> LinkedList<T>
112where
113 T: Copy,
114{
115 let mut ll = LinkedList::default();
116 for v in data {
117 ll.push_back(*v);
118 }
119 ll
120}

Callers 3

normalFunction · 0.85
reverseFunction · 0.85
find_kth2tailFunction · 0.85

Calls 1

push_backMethod · 0.80

Tested by

no test coverage detected