1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
fn main() { println!("Hello, world!"); } struct Solution {} impl Solution { pub fn next_greater_element(nums1: Vec<i32>, nums2: Vec<i32>) -> Vec<i32> { let mut result = nums1.clone(); for i in result.iter_mut() { nums2.iter().position(|&x| x == *i); } result } }