112题。消除气泡
Solution Stats
Problem Comments
-
4 Comments
Show
1 older comment
Chien-Han Suon 2 Nov 2020
love this one
Jakeb Chouinardon 20 Nov 2020
28 attempts later, we finally made it
Ngo Tien Sangon 8 Jul 2021
nice question!
Nguyen Viet Dungon 11 Aug 2021
good problem
Solution Comments
-
1 Comment
Atsushi Uenoon 15 Jun 2016
zeros are added to convert a logical to double.
-
1 Comment
Jean-Marie Sainthillieron 4 Sep 2013
The first time I see this kind of bsxfun.
-
2 Comments
Mike Keenanon 1 Feb 2012
Looks like I have the lamest possible solution!
yurenchuon 30 Apr 2017
I think it would be funny to see this solution in action by an animation of iterations! :-)
-
1 Comment
Alfonso Nieto-Castanonon 28 Jan 2012
this breaks with nan's, solution 6118 does not
-
2 Comments
-
1 Comment
Alfonso Nieto-Castanonon 26 Jan 2012
need to fix the test suite to include non-sorted non-zero elements
-
1 Comment
Alfonso Nieto-Castanonon 28 Jan 2012
wishful thinking: perhaps sort 'should' behave like relational operators...
Problem Recent Solvers920
Suggested Problems
3455 Solvers
1833 Solvers
Given two arrays, find the maximum overlap
817 Solvers
Get the length of a given vector
6219 Solvers
518 Solvers
More from this Author50
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!