I need to first access and then compare elements from two separate lists and based on whichever element has the smaller value, remove the lesser element and assign it a position within a third list. How do I accomplish this?
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.
I believe you can just add the elements of both the list in a new list of one of the list and then sort it in ascending order e.g. below(pseudo code):
Now
mergedListshould have sorted elements.