Apxor interview question

arrays problems ,trees,sql query retrival