Round 1
Questions:
-
Given an array, you can perform the following operation: Choose integers x and y, and change every occurrence of x to y. Return the minimum number of operations to make the array palindromic.
-
An ML model has a certain array of neurons. In each odd generation, a neuron can be increased by 1; in even generations, it can be increased by 2. Return the minimum generations to make all neurons equal.
Example:
{1,1,2,4} → generation 1 {2,1,2,4} → generation 2 {4,1,2,4} → generation 3 {4,2,2,4} → generation 4 {4,4,2,4} → generation 5 (no change) → generation 6 {4,4,4,4}
Candidate's Approach
No approach provided.
Interviewer's Feedback
No feedback provided.