1. Given a non-decreasing array, how can I determine the indices of an element X within it? If the element is not present, the output should be [-1, -1]. For example, for the array [1,2,3,3,5,5,7,8] and X=5, the expected output is [4,5], as the element 5 is found at the 4th and 5th indices.
2. How would you sort an array containing only 0s and 1s?
3. What is your long-term goal?
4. Where is the bean annotation used in Spring Boot? In a class or method?
5. Explain currying with arrow functions.