JavaScript:实现BeadSort珠排序算法
/**
* Bead Sort, also known as Gravity sort.
*
* This algorithm was inspired from natural phenomena and was designed keeping in mind objects (or beads) falling under
* the influence of gravity.
*
* NOTE: It only works for arrays of positive integers.
*
*/
export function beadSort (sequence) {
/* Let's ensure our sequence has only Positive Integers */