설문 종료
설문
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.