投票は終了しました
投票
Which does NOT return sorted output for a vector of unique values (e.g., v = [3,7,2,5,1])?
sort(v)
8%
unique(v)
16%
union(v, [ ])
17%
intersect(v, v)
14%
setdiff(v, [ ])
12%
All return sorted output
33%
1193 票
8 件のコメント
can you give solution oft these problrm
I don't know about the other functions, but unique used to return the original order (which is probably why the 'stable' switch exists).
I also find it interesting to see the orientation that each of these functions return.