Frage im Vorstellungsgespräch bei ConnectWise

1. How to remove duplicates from an array without using an extra object or creating a new Set. 2. How to implement the flatten method on your own. 3. Why did React move from Class based components to Functional based components ?