Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/StudyRust/leetcode_rust
/ build_array
Function
build_array
1920-build-array-from-permutation.rs:14–16 ·
view source on GitHub ↗
(nums: Vec<i32>)
Source
from the content-addressed store, hash-verified
12
// = [0,1,2,4,5,3]
13
14
pub fn build_array(nums: Vec<i32>) -> Vec<i32> {
15
nums.clone().into_iter().map(|x| nums[x as usize]).collect()
16
}
Callers
1
main
Function · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected