March 14th, 2012, 7:41 pm
QuoteOriginally posted by: JackBryanThis is an exam question. The exam has been done. Given a specific language including a list of unsorted integers, the list does not support random access. It has functions of head(), tail(), concatenate(), define, return , compare operator < , > , size() , if .. then ? . It does not support random access.Design/Implement a sorting algorithm with this language so that a sorted list is returned. Any C/C++ or other language library functions, library algorithms or data containers are not allowed to be used. I have no idea about how to handle it without random access functions.What will be the result of head() after a concatenate(tail(), head()) operation; the item after the original head() used in the concatenate() or do you now have a circular list?
Last edited by
dd3 on March 13th, 2012, 11:00 pm, edited 1 time in total.