SAP interview question

red black tree insertion code. Some stack problem to code. Few SQL queries and questions around java concepts