js单向链表的具体实现实例(3)

var i = this.root;
            while (Boolean(i = i.next))
            {
                var j = this.root;
                while (Boolean(j = j.next))
                {
                    if (j.next != null)
                    {
                        if (fn.call(this, j))
                        {
                            var Key = j.Key;
                            var Value = j.Value;
                            j.Key = j.next.Key;
                            j.Value = j.next.Value;
                            j.next.Key = Key;
                            j.next.Value = Value;
                        }
                    }
                }
                this.end = i;
            }

}
        else
        {

}
    }
};

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wdggpf.html