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

【2019-04-08】给定一个有序数组,长度为1w。请将这个数组随机打乱。 #21

Open
Pearyman opened this issue Apr 8, 2019 · 3 comments
Labels
javascript-related js相关知识点

Comments

@Pearyman
Copy link
Member

Pearyman commented Apr 8, 2019

No description provided.

@Pearyman Pearyman added the javascript-related js相关知识点 label Apr 8, 2019
@momodiy
Copy link

momodiy commented Apr 9, 2019

a.sort(v=> Math.random() - 0.5)
有序且长度为1w是有什么打乱的优化方式吗?

@Pearyman
Copy link
Member Author

Pearyman commented Apr 9, 2019

@momodiy 这种实现方式并不能实现真正的随机哦~

@momodiy
Copy link

momodiy commented Apr 11, 2019

@momodiy 这种实现方式并不能实现真正的随机哦~

愿闻其详

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
javascript-related js相关知识点
Projects
None yet
Development

No branches or pull requests

2 participants