Optiva interview question

garbage collection solid principles design patterns array based problem