2019-11-11 LeetCode in Rust LeetCode 1121. Divide Array Into Increasing Sequences Problem Statement impl Solution { pub fn can_divide_into_subsequences(nums: Vec<i32>, k: i32) -> bool { let (mut max, mut cur) = (1, 0); for i in 0..nums.len() - 1 { if nums[i] == nums[i + 1] { cur += 1; max = std::cmp::max(max, cur); } else { cur = 1; } } return nums.len() >= (k * max) as usize; }} Newer LeetCode 1066. Campus Bikes II Older LeetCode 1146. Snapshot Array