Talk:Order disjoint list items: Difference between revisions

no edit summary
No edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 37:
Data M: cat mat Order N: cat mat cat -> Result M': cat mat
Data M: cat mat Order N: mat cat cat -> Result M': mat cat
Data M: cat mat Order N: cat cat mat -> Result M': cat cat
 
'''Python output:'''
Line 61 ⟶ 62:
 
If the Scala implementation is incorrect, can the task please be clarified to avoid this misinterpretation. Alternatively, if all the other impementations are wrong, can the task please be clarified to avoid this misinterpretation :) --[[User:Jnd|Jnd]] ([[User talk:Jnd|talk]]) 10:20, 13 October 2014 (UTC)
 
:Hi Jnd. We have:
::''"Given M as a list of items and another list N of items chosen from M, create M' as a list with the first occurrences of items from N sorted to be in one of the set of indices of their original occurrence in M but in the order given by their order in N."''
 
:For:
:: <code>Data M: cat cat mat Order N: cat mat</code>
:The second cat in M is never indexed by an item in N. <br>
:There is only one cat in N which matches the first cat in M. mat matches the last item in M so only the first and last items in M ''could'' be rearranged by their order in N. --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 11:08, 13 October 2014 (UTC)
 
::Thanks Paddy3118, I still can’t get my head around the language, but you’re saying that items in N are taken from M without replacement, then the corresponding positions in M' are taken by successive items from N? --[[User:Jnd|Jnd]] ([[User talk:Jnd|talk]]) 11:45, 13 October 2014 (UTC)
 
== Mathematica has fault ==
 
Mathematica has fault in A B C A B D A B E order by E A D A at the last letter, should be A and is E. Maybe is the copy of results, I didn't execute the code.
404

edits