I need a container (like array)for integers in such a way that given x and y and z ,which has to be inserted between x and y it will be possible to insert z between them.And given x and y ,get if x is placed left to the y.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Well you could use an
std::set<int>. It will always keep your elements ordered.