Pregunta de entrevista de Paytm

Find next greater element for each element in an array in O(n). How would you implement a feature that involves fetching thousand of images through network call and displaying them in collection view. Caching types available in swift and their use cases. Thread management.