Virtusa interview question

diamond problem in c++ 7)write code for reverse a string 8)write code for sort array 9)about collections