Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

解释APL的快排 #7

Open
lg6s opened this issue Sep 18, 2018 · 1 comment
Open

解释APL的快排 #7

lg6s opened this issue Sep 18, 2018 · 1 comment
Assignees
Labels
alu algorithm算法/logic逻辑 APL 一族+J/K/Q Q 答疑解惑 todo 待办/填坑

Comments

@lg6s
Copy link
Member

lg6s commented Sep 18, 2018

https://ruby-china.org/topics/18458

Q{1:  S{ ⍺⍺ }  ((<S)=S(>S))?}
q:{f:*x@1?#x;:[0=#x;x;,/(_f x@&x<f;x@&x=f;_f x@&x>f)]}
q:{$[2>distinct x;x;raze q each x where each not scan x < rand x]}

https://www.dyalog.com/blog/2014/12/quicksort-in-apl/ https://rosettacode.org/wiki/Sorting_algorithms/Quicksort#K https://lifeisalist.wordpress.com/2014/11/21/quicksort-in-q/

@lg6s lg6s added alu algorithm算法/logic逻辑 APL 一族+J/K/Q todo 待办/填坑 labels Sep 18, 2018
@lg6s lg6s added the Q 答疑解惑 label Sep 18, 2018
@lg6s
Copy link
Member Author

lg6s commented Sep 19, 2018

有反馈说Q的代码不太好读,https://ruby-china.org/topics/18458#reply-346698
回头找下更好理解的版本

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alu algorithm算法/logic逻辑 APL 一族+J/K/Q Q 答疑解惑 todo 待办/填坑
Projects
None yet
Development

No branches or pull requests

2 participants