How to sort two lists? Sort distance
|
05-02-2016, 04:00 PM
Post: #13
|
|||
|
|||
RE: How to sort two lists?
(05-02-2016 10:35 AM)Tyann Wrote: Merci pour vôtre réponse, mais vôtre solution ne convient pas. Sorry for the misunderstanding. Here is a program doing what you want: Code: EXPORT Sortn(list,n) For example: Sortn({{3,2,1},{15,20,18}},1) -> {{1,2,3},{18,20,15}} Sortn({{3,2,1},{15,20,18},{32,35,27}},1) -> {{1,2,3},{18,20,15},{27,35,32}} Sortn({{3,2,1},{15,20,18},{32,35,27}},2) -> {{3,1,2},{15,18,20},{32,27,35}} Sortn({{3,2,1},{15,20,18},{32,35,27}},3) -> {{1,3,2},{18,15,20},{27,32,35}} |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)